Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7228e2aa
Commit
7228e2aa
authored
Jul 30, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localui: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
69258469
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
localui.c
dlls/localui/localui.c
+5
-5
No files found.
dlls/localui/localui.c
View file @
7228e2aa
...
...
@@ -375,7 +375,7 @@ static INT_PTR CALLBACK dlgproc_lptconfig(HWND hwnd, UINT msg, WPARAM wparam, LP
status
=
FALSE
;
res
=
GetDlgItemInt
(
hwnd
,
LPTCONFIG_EDIT
,
(
BOOL
*
)
&
status
,
FALSE
);
/* length is in WCHAR, including the '\0' */
GetDlgItemTextW
(
hwnd
,
LPTCONFIG_EDIT
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
bufferW
[
0
]
));
GetDlgItemTextW
(
hwnd
,
LPTCONFIG_EDIT
,
bufferW
,
ARRAY_SIZE
(
bufferW
));
TRACE
(
"got %s and %u (translated: %u)
\n
"
,
debugstr_w
(
bufferW
),
res
,
status
);
/* native localui.dll use the same limits */
...
...
@@ -416,10 +416,10 @@ static DWORD get_type_from_name(LPCWSTR name)
{
HANDLE
hfile
;
if
(
!
strncmpiW
(
name
,
portname_LPT
,
sizeof
(
portname_LPT
)
/
sizeof
(
WCHAR
)
-
1
))
if
(
!
strncmpiW
(
name
,
portname_LPT
,
ARRAY_SIZE
(
portname_LPT
)
-
1
))
return
PORT_IS_LPT
;
if
(
!
strncmpiW
(
name
,
portname_COM
,
sizeof
(
portname_COM
)
/
sizeof
(
WCHAR
)
-
1
))
if
(
!
strncmpiW
(
name
,
portname_COM
,
ARRAY_SIZE
(
portname_COM
)
-
1
))
return
PORT_IS_COM
;
if
(
!
strcmpiW
(
name
,
portname_FILE
))
...
...
@@ -431,10 +431,10 @@ static DWORD get_type_from_name(LPCWSTR name)
if
(
name
[
0
]
==
'|'
)
return
PORT_IS_PIPE
;
if
(
!
strncmpW
(
name
,
portname_CUPS
,
sizeof
(
portname_CUPS
)
/
sizeof
(
WCHAR
)
-
1
))
if
(
!
strncmpW
(
name
,
portname_CUPS
,
ARRAY_SIZE
(
portname_CUPS
)
-
1
))
return
PORT_IS_CUPS
;
if
(
!
strncmpW
(
name
,
portname_LPR
,
sizeof
(
portname_LPR
)
/
sizeof
(
WCHA
R
)
-
1
))
if
(
!
strncmpW
(
name
,
portname_LPR
,
ARRAY_SIZE
(
portname_LP
R
)
-
1
))
return
PORT_IS_LPR
;
/* Must be a file or a directory. Does the file exist ? */
...
...
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