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
cd82a649
Commit
cd82a649
authored
Jul 13, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmic: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4c288720
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
main.c
programs/wmic/main.c
+3
-3
No files found.
programs/wmic/main.c
View file @
cd82a649
...
...
@@ -82,7 +82,7 @@ static const WCHAR *find_class( const WCHAR *alias )
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
alias_map
)
/
sizeof
(
alias_map
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
alias_map
);
i
++
)
{
if
(
!
strcmpiW
(
alias
,
alias_map
[
i
].
alias
))
return
alias_map
[
i
].
class
;
}
...
...
@@ -158,7 +158,7 @@ static int output_message( int msg )
static
const
WCHAR
fmtW
[]
=
{
'%'
,
's'
,
0
};
WCHAR
buffer
[
8192
];
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
);
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
buffer
,
ARRAY_SIZE
(
buffer
)
);
return
output_string
(
fmtW
,
buffer
);
}
...
...
@@ -193,7 +193,7 @@ static int query_prop( const WCHAR *class, const WCHAR *propname )
hr
=
IWbemLocator_ConnectServer
(
locator
,
path
,
NULL
,
NULL
,
NULL
,
0
,
NULL
,
NULL
,
&
services
);
if
(
hr
!=
S_OK
)
goto
done
;
len
=
strlenW
(
class
)
+
sizeof
(
select_allW
)
/
sizeof
(
select_allW
[
0
]
);
len
=
strlenW
(
class
)
+
ARRAY_SIZE
(
select_allW
);
if
(
!
(
query
=
SysAllocStringLen
(
NULL
,
len
)))
goto
done
;
strcpyW
(
query
,
select_allW
);
strcatW
(
query
,
class
);
...
...
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