Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
53c80a2b
Commit
53c80a2b
authored
Jul 17, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d93954bd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
13 deletions
+13
-13
avisplit.c
dlls/quartz/avisplit.c
+1
-1
filesource.c
dlls/quartz/filesource.c
+3
-3
filtermapper.c
dlls/quartz/filtermapper.c
+1
-1
main.c
dlls/quartz/main.c
+2
-2
parser.c
dlls/quartz/parser.c
+1
-1
vmr9.c
dlls/quartz/vmr9.c
+3
-3
waveparser.c
dlls/quartz/waveparser.c
+2
-2
No files found.
dlls/quartz/avisplit.c
View file @
53c80a2b
...
...
@@ -794,7 +794,7 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE
case
ckidSTREAMNAME
:
TRACE
(
"processing stream name
\n
"
);
/* FIXME: this doesn't exactly match native version (we omit the "##)" prefix), but hey... */
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)(
pChunk
+
1
),
pChunk
->
cb
,
piOutput
.
achName
,
sizeof
(
piOutput
.
achName
)
/
sizeof
(
piOutput
.
achName
[
0
]
));
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)(
pChunk
+
1
),
pChunk
->
cb
,
piOutput
.
achName
,
ARRAY_SIZE
(
piOutput
.
achName
));
break
;
case
ckidSTREAMHANDLERDATA
:
FIXME
(
"process stream handler data
\n
"
);
...
...
dlls/quartz/filesource.c
View file @
53c80a2b
...
...
@@ -282,7 +282,7 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID *
{
HKEY
hkeyMajor
;
WCHAR
wszMajorKeyName
[
CHARS_IN_GUID
];
DWORD
dwKeyNameLength
=
sizeof
(
wszMajorKeyName
)
/
sizeof
(
wszMajorKeyName
[
0
]
);
DWORD
dwKeyNameLength
=
ARRAY_SIZE
(
wszMajorKeyName
);
static
const
WCHAR
wszExtensions
[]
=
{
'E'
,
'x'
,
't'
,
'e'
,
'n'
,
's'
,
'i'
,
'o'
,
'n'
,
's'
,
0
};
if
(
RegEnumKeyExW
(
hkeyMediaType
,
indexMajor
,
wszMajorKeyName
,
&
dwKeyNameLength
,
NULL
,
NULL
,
NULL
,
NULL
)
!=
ERROR_SUCCESS
)
...
...
@@ -304,7 +304,7 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID *
{
HKEY
hkeyMinor
;
WCHAR
wszMinorKeyName
[
CHARS_IN_GUID
];
DWORD
dwMinorKeyNameLen
=
sizeof
(
wszMinorKeyName
)
/
sizeof
(
wszMinorKeyName
[
0
]
);
DWORD
dwMinorKeyNameLen
=
ARRAY_SIZE
(
wszMinorKeyName
);
WCHAR
wszSourceFilterKeyName
[
CHARS_IN_GUID
];
DWORD
dwSourceFilterKeyNameLen
=
sizeof
(
wszSourceFilterKeyName
);
DWORD
maxValueLen
;
...
...
@@ -326,7 +326,7 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID *
DWORD
dwType
;
WCHAR
wszValueName
[
14
];
/* longest name we should encounter will be "Source Filter" */
LPWSTR
wszPatternString
=
HeapAlloc
(
GetProcessHeap
(),
0
,
maxValueLen
);
DWORD
dwValueNameLen
=
sizeof
(
wszValueName
)
/
sizeof
(
wszValueName
[
0
]);
/* remember this is in chars */
DWORD
dwValueNameLen
=
ARRAY_SIZE
(
wszValueName
);
DWORD
dwDataLen
=
maxValueLen
;
/* remember this is in bytes */
if
(
RegEnumValueW
(
hkeyMinor
,
indexValue
,
wszValueName
,
&
dwValueNameLen
,
NULL
,
&
dwType
,
(
LPBYTE
)
wszPatternString
,
&
dwDataLen
)
!=
ERROR_SUCCESS
)
...
...
dlls/quartz/filtermapper.c
View file @
53c80a2b
...
...
@@ -703,7 +703,7 @@ static HRESULT WINAPI FilterMapper3_RegisterFilter(
* the + 1 is for the separator ('\\'). The -1 is
* because CHARS_IN_GUID includes the null terminator
*/
nameLen
=
sizeof
(
wszDevice
)
/
sizeof
(
wszDevice
[
0
]
)
+
CHARS_IN_GUID
-
1
+
1
;
nameLen
=
ARRAY_SIZE
(
wszDevice
)
+
CHARS_IN_GUID
-
1
+
1
;
if
(
szInstance
)
nameLen
+=
strlenW
(
szInstance
);
...
...
dlls/quartz/main.c
View file @
53c80a2b
...
...
@@ -185,7 +185,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
if
(
IsEqualGUID
(
&
IID_IClassFactory
,
riid
)
||
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
for
(
i
=
0
;
i
<
sizeof
(
object_creation
)
/
sizeof
(
object_creation
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
object_creation
);
i
++
)
{
if
(
IsEqualGUID
(
object_creation
[
i
].
clsid
,
rclsid
))
{
...
...
@@ -313,7 +313,7 @@ DWORD WINAPI AMGetErrorTextA(HRESULT hr, LPSTR buffer, DWORD maxlen)
if
(
!
buffer
)
return
0
;
res
=
AMGetErrorTextW
(
hr
,
errorW
,
sizeof
(
errorW
)
/
sizeof
(
*
errorW
));
res
=
AMGetErrorTextW
(
hr
,
errorW
,
ARRAY_SIZE
(
errorW
));
return
WideCharToMultiByte
(
CP_ACP
,
0
,
errorW
,
res
,
buffer
,
maxlen
,
0
,
0
);
}
...
...
dlls/quartz/parser.c
View file @
53c80a2b
...
...
@@ -109,7 +109,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const IBaseFilterVtbl *Parser_Vtbl, c
/* construct input pin */
piInput
.
dir
=
PINDIR_INPUT
;
piInput
.
pFilter
=
&
pParser
->
filter
.
IBaseFilter_iface
;
lstrcpynW
(
piInput
.
achName
,
wcsInputPinName
,
sizeof
(
piInput
.
achName
)
/
sizeof
(
piInput
.
achName
[
0
]
));
lstrcpynW
(
piInput
.
achName
,
wcsInputPinName
,
ARRAY_SIZE
(
piInput
.
achName
));
if
(
!
start
)
start
=
Parser_ChangeStart
;
...
...
dlls/quartz/vmr9.c
View file @
53c80a2b
...
...
@@ -1322,7 +1322,7 @@ static BOOL CALLBACK get_available_monitors_proc(HMONITOR hmon, HDC hdc, LPRECT
info
->
hMon
=
hmon
;
info
->
dwFlags
=
mi
.
dwFlags
;
lstrcpynW
(
info
->
szDevice
,
mi
.
szDevice
,
sizeof
(
info
->
szDevice
)
/
sizeof
(
WCHAR
));
lstrcpynW
(
info
->
szDevice
,
mi
.
szDevice
,
ARRAY_SIZE
(
info
->
szDevice
));
/* FIXME: how to get these values? */
info
->
szDescription
[
0
]
=
0
;
...
...
@@ -1339,7 +1339,7 @@ static BOOL CALLBACK get_available_monitors_proc(HMONITOR hmon, HDC hdc, LPRECT
info
->
hMon
=
hmon
;
info
->
dwFlags
=
mi
.
dwFlags
;
lstrcpynW
(
info
->
szDevice
,
mi
.
szDevice
,
sizeof
(
info
->
szDevice
)
/
sizeof
(
WCHAR
));
lstrcpynW
(
info
->
szDevice
,
mi
.
szDevice
,
ARRAY_SIZE
(
info
->
szDevice
));
/* FIXME: how to get these values? */
info
->
szDescription
[
0
]
=
0
;
...
...
@@ -2958,7 +2958,7 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPrese
width
=
This
->
info
.
dwWidth
;
height
=
This
->
info
.
dwHeight
;
for
(
i
=
0
;
i
<
sizeof
(
t_vert
)
/
sizeof
(
t_vert
[
0
]
);
++
i
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
t_vert
);
++
i
)
{
if
(
i
%
2
)
{
...
...
dlls/quartz/waveparser.c
View file @
53c80a2b
...
...
@@ -254,8 +254,8 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin,
piOutput
.
dir
=
PINDIR_OUTPUT
;
piOutput
.
pFilter
=
&
pWAVEParser
->
Parser
.
filter
.
IBaseFilter_iface
;
lstrcpynW
(
piOutput
.
achName
,
wcsOutputPinName
,
sizeof
(
piOutput
.
achName
)
/
sizeof
(
piOutput
.
achName
[
0
]
));
lstrcpynW
(
piOutput
.
achName
,
wcsOutputPinName
,
ARRAY_SIZE
(
piOutput
.
achName
));
hr
=
IAsyncReader_SyncRead
(
This
->
pReader
,
pos
,
sizeof
(
list
),
(
BYTE
*
)
&
list
);
pos
+=
sizeof
(
list
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment