Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
b2fc5917
Commit
b2fc5917
authored
Aug 08, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7ddbec0e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
driver.c
dlls/user32/driver.c
+1
-1
icontitle.c
dlls/user32/icontitle.c
+2
-2
lstr.c
dlls/user32/lstr.c
+2
-2
user_main.c
dlls/user32/user_main.c
+2
-2
win.c
dlls/user32/win.c
+2
-2
No files found.
dlls/user32/driver.c
View file @
b2fc5917
...
...
@@ -57,7 +57,7 @@ static HMODULE load_desktop_driver( HWND hwnd )
HKEY
hkey
;
DWORD
size
;
WCHAR
path
[
MAX_PATH
];
WCHAR
key
[
(
sizeof
(
key_pathW
)
+
sizeof
(
displayW
))
/
sizeof
(
WCHAR
)
+
40
];
WCHAR
key
[
ARRAY_SIZE
(
key_pathW
)
+
ARRAY_SIZE
(
displayW
)
+
40
];
UINT
guid_atom
=
HandleToULong
(
GetPropW
(
hwnd
,
display_device_guid_propW
));
USER_CheckNotLock
();
...
...
dlls/user32/icontitle.c
View file @
b2fc5917
...
...
@@ -90,7 +90,7 @@ static BOOL ICONTITLE_SetTitlePos( HWND hwnd, HWND owner )
INT
cx
,
cy
;
POINT
pt
;
int
length
=
GetWindowTextW
(
owner
,
str
,
sizeof
(
str
)
/
sizeof
(
WCHAR
)
);
int
length
=
GetWindowTextW
(
owner
,
str
,
ARRAY_SIZE
(
str
)
);
while
(
length
&&
str
[
length
-
1
]
==
' '
)
/* remove trailing spaces */
str
[
--
length
]
=
0
;
...
...
@@ -178,7 +178,7 @@ static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
{
WCHAR
buffer
[
80
];
INT
length
=
GetWindowTextW
(
owner
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
])
);
INT
length
=
GetWindowTextW
(
owner
,
buffer
,
ARRAY_SIZE
(
buffer
)
);
SetTextColor
(
hDC
,
textColor
);
SetBkMode
(
hDC
,
TRANSPARENT
);
...
...
dlls/user32/lstr.c
View file @
b2fc5917
...
...
@@ -335,7 +335,7 @@ DWORD WINAPI CharLowerBuffA( LPSTR str, DWORD len )
if
(
!
str
)
return
0
;
/* YES */
lenW
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
len
,
NULL
,
0
);
if
(
lenW
>
sizeof
(
buffer
)
/
sizeof
(
WCHAR
))
if
(
lenW
>
ARRAY_SIZE
(
buffer
))
{
strW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenW
*
sizeof
(
WCHAR
));
if
(
!
strW
)
return
0
;
...
...
@@ -370,7 +370,7 @@ DWORD WINAPI CharUpperBuffA( LPSTR str, DWORD len )
if
(
!
str
)
return
0
;
/* YES */
lenW
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
len
,
NULL
,
0
);
if
(
lenW
>
sizeof
(
buffer
)
/
sizeof
(
WCHAR
))
if
(
lenW
>
ARRAY_SIZE
(
buffer
))
{
strW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lenW
*
sizeof
(
WCHAR
));
if
(
!
strW
)
return
0
;
...
...
dlls/user32/user_main.c
View file @
b2fc5917
...
...
@@ -169,7 +169,7 @@ static const WCHAR *get_default_desktop(void)
static
const
WCHAR
app_defaultsW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'A'
,
'p'
,
'p'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
's'
,
0
};
static
WCHAR
buffer
[
MAX_PATH
+
sizeof
(
explorerW
)
/
sizeof
(
WCHAR
)];
static
WCHAR
buffer
[
MAX_PATH
+
ARRAY_SIZE
(
explorerW
)];
WCHAR
*
p
,
*
appname
=
buffer
;
const
WCHAR
*
ret
=
defaultW
;
DWORD
len
;
...
...
@@ -433,7 +433,7 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reason )
STARTUPINFOW
si
;
void
*
redir
;
GetSystemDirectoryW
(
app
,
MAX_PATH
-
sizeof
(
winebootW
)
/
sizeof
(
WCHAR
)
);
GetSystemDirectoryW
(
app
,
MAX_PATH
-
ARRAY_SIZE
(
winebootW
)
);
strcatW
(
app
,
winebootW
);
strcpyW
(
cmdline
,
app
);
...
...
dlls/user32/win.c
View file @
b2fc5917
...
...
@@ -2049,8 +2049,8 @@ HWND WINAPI GetDesktopWindow(void)
STARTUPINFOW
si
;
PROCESS_INFORMATION
pi
;
WCHAR
windir
[
MAX_PATH
];
WCHAR
app
[
MAX_PATH
+
sizeof
(
explorer
)
/
sizeof
(
WCHAR
)];
WCHAR
cmdline
[
MAX_PATH
+
(
sizeof
(
explorer
)
+
sizeof
(
args
))
/
sizeof
(
WCHAR
)];
WCHAR
app
[
MAX_PATH
+
ARRAY_SIZE
(
explorer
)];
WCHAR
cmdline
[
MAX_PATH
+
ARRAY_SIZE
(
explorer
)
+
ARRAY_SIZE
(
args
)];
WCHAR
desktop
[
MAX_PATH
];
void
*
redir
;
...
...
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