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
f559c605
Commit
f559c605
authored
Jul 24, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskkill: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
beb46435
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
taskkill.c
programs/taskkill/taskkill.c
+3
-5
No files found.
programs/taskkill/taskkill.c
View file @
f559c605
...
...
@@ -47,7 +47,7 @@ static int taskkill_vprintfW(const WCHAR *msg, __ms_va_list va_args)
WCHAR
msg_buffer
[
8192
];
wlen
=
FormatMessageW
(
FORMAT_MESSAGE_FROM_STRING
,
msg
,
0
,
0
,
msg_buffer
,
sizeof
(
msg_buffer
)
/
sizeof
(
*
msg_buffer
),
&
va_args
);
ARRAY_SIZE
(
msg_buffer
),
&
va_args
);
ret
=
WriteConsoleW
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
msg_buffer
,
wlen
,
&
count
,
NULL
);
if
(
!
ret
)
...
...
@@ -92,8 +92,7 @@ static int WINAPIV taskkill_message_printfW(int msg, ...)
WCHAR
msg_buffer
[
8192
];
int
len
;
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
msg_buffer
,
sizeof
(
msg_buffer
)
/
sizeof
(
WCHAR
));
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
msg_buffer
,
ARRAY_SIZE
(
msg_buffer
));
__ms_va_start
(
va_args
,
msg
);
len
=
taskkill_vprintfW
(
msg_buffer
,
va_args
);
...
...
@@ -107,8 +106,7 @@ static int taskkill_message(int msg)
static
const
WCHAR
formatW
[]
=
{
'%'
,
'1'
,
0
};
WCHAR
msg_buffer
[
8192
];
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
msg_buffer
,
sizeof
(
msg_buffer
)
/
sizeof
(
WCHAR
));
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
msg_buffer
,
ARRAY_SIZE
(
msg_buffer
));
return
taskkill_printfW
(
formatW
,
msg_buffer
);
}
...
...
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