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
dc235ab4
Commit
dc235ab4
authored
Nov 12, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ed712a96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
registry.c
dlls/advapi32/registry.c
+4
-4
service.c
dlls/advapi32/service.c
+1
-1
No files found.
dlls/advapi32/registry.c
View file @
dc235ab4
...
...
@@ -108,7 +108,7 @@ static BOOL is_wow6432node( const UNICODE_STRING *name )
static
const
WCHAR
wow6432nodeW
[]
=
{
'W'
,
'o'
,
'w'
,
'6'
,
'4'
,
'3'
,
'2'
,
'N'
,
'o'
,
'd'
,
'e'
};
return
(
name
->
Length
==
sizeof
(
wow6432nodeW
)
&&
!
memicmpW
(
name
->
Buffer
,
wow6432nodeW
,
sizeof
(
wow6432nodeW
)
/
sizeof
(
WCHAR
)
));
!
memicmpW
(
name
->
Buffer
,
wow6432nodeW
,
ARRAY_SIZE
(
wow6432nodeW
)
));
}
/* open the Wow6432Node subkey of the specified key */
...
...
@@ -148,9 +148,9 @@ static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES
UNICODE_STRING
str
;
/* don't try to create registry root */
if
(
!
attr
->
RootDirectory
&&
len
>
sizeof
(
registry_root
)
/
sizeof
(
WCHAR
)
&&
!
memicmpW
(
buffer
,
registry_root
,
sizeof
(
registry_root
)
/
sizeof
(
WCHAR
)))
i
+=
sizeof
(
registry_root
)
/
sizeof
(
WCHAR
);
if
(
!
attr
->
RootDirectory
&&
len
>
ARRAY_SIZE
(
registry_root
)
&&
!
memicmpW
(
buffer
,
registry_root
,
ARRAY_SIZE
(
registry_root
)))
i
+=
ARRAY_SIZE
(
registry_root
);
while
(
i
<
len
&&
buffer
[
i
]
!=
'\\'
)
i
++
;
if
(
i
==
len
&&
!
force_wow32
)
return
status
;
...
...
dlls/advapi32/service.c
View file @
dc235ab4
...
...
@@ -299,7 +299,7 @@ static LPWSTR service_get_pipe_name(void)
RegCloseKey
(
service_current_key
);
if
(
ret
!=
ERROR_SUCCESS
||
type
!=
REG_DWORD
)
return
NULL
;
len
=
sizeof
(
format
)
/
sizeof
(
WCHAR
)
+
10
/* strlenW("4294967295") */
;
len
=
ARRAY_SIZE
(
format
)
+
10
/* strlenW("4294967295") */
;
name
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
name
)
return
NULL
;
...
...
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