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
bb2c799f
Commit
bb2c799f
authored
Jul 21, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Jul 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Use generic ARRAY_SIZE macro to allow for broader use.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3763c7a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
regproc.c
programs/regedit/regproc.c
+3
-3
No files found.
programs/regedit/regproc.c
View file @
bb2c799f
...
...
@@ -50,7 +50,7 @@ static HKEY reg_class_keys[] = {
HKEY_CURRENT_CONFIG
,
HKEY_CURRENT_USER
,
HKEY_DYN_DATA
};
#define
REG_CLASS_NUMBER (sizeof(reg_class_keys) / sizeof(reg_class_keys[0]
))
#define
ARRAY_SIZE(A) (sizeof(A)/sizeof(*A
))
/* return values */
#define NOT_ENOUGH_MEMORY 1
...
...
@@ -317,7 +317,7 @@ static BOOL parseKeyName(LPWSTR lpKeyName, HKEY *hKey, LPWSTR *lpKeyPath)
}
*
hKey
=
NULL
;
for
(
i
=
0
;
i
<
REG_CLASS_NUMBER
;
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
reg_class_keys
)
;
i
++
)
{
if
(
CompareStringW
(
LOCALE_USER_DEFAULT
,
0
,
lpKeyName
,
len
,
reg_class_namesW
[
i
],
-
1
)
==
CSTR_EQUAL
&&
len
==
lstrlenW
(
reg_class_namesW
[
i
]))
{
*
hKey
=
reg_class_keys
[
i
];
...
...
@@ -1309,7 +1309,7 @@ BOOL export_registry_key(WCHAR *file_name, WCHAR *reg_key_name, DWORD format)
/* export all registry classes */
file
=
REGPROC_open_export_file
(
file_name
,
unicode
);
for
(
i
=
0
;
i
<
REG_CLASS_NUMBER
;
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
reg_class_keys
)
;
i
++
)
{
/* do not export HKEY_CLASSES_ROOT */
if
(
reg_class_keys
[
i
]
!=
HKEY_CLASSES_ROOT
&&
reg_class_keys
[
i
]
!=
HKEY_CURRENT_USER
&&
...
...
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