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
f051aa67
Commit
f051aa67
authored
Oct 29, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2600ecd4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
driveui.c
programs/winecfg/driveui.c
+1
-1
theme.c
programs/winecfg/theme.c
+5
-7
winecfg.c
programs/winecfg/winecfg.c
+1
-1
No files found.
programs/winecfg/driveui.c
View file @
f051aa67
...
...
@@ -440,7 +440,7 @@ static void update_controls(HWND dialog)
type
=
current_drive
->
type
;
SendDlgItemMessageW
(
dialog
,
IDC_COMBO_TYPE
,
CB_RESETCONTENT
,
0
,
0
);
for
(
i
=
0
;
i
<
sizeof
(
type_pairs
)
/
sizeof
(
struct
drive_typemap
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
type_pairs
);
i
++
)
{
WCHAR
driveDesc
[
64
];
LoadStringW
(
GetModuleHandleW
(
NULL
),
type_pairs
[
i
].
idDesc
,
driveDesc
,
ARRAY_SIZE
(
driveDesc
));
...
...
programs/winecfg/theme.c
View file @
f051aa67
...
...
@@ -635,7 +635,7 @@ static void on_theme_install(HWND dialog)
ofn
.
nFilterIndex
=
0
;
ofn
.
lpstrFile
=
file
;
ofn
.
lpstrFile
[
0
]
=
'\0'
;
ofn
.
nMaxFile
=
sizeof
(
file
)
/
sizeof
(
filetitle
[
0
]
);
ofn
.
nMaxFile
=
ARRAY_SIZE
(
file
);
ofn
.
lpstrFileTitle
=
filetitle
;
ofn
.
lpstrFileTitle
[
0
]
=
'\0'
;
ofn
.
nMaxFileTitle
=
ARRAY_SIZE
(
filetitle
);
...
...
@@ -729,8 +729,6 @@ static struct ShellFolderInfo asfiInfo[] = {
static
struct
ShellFolderInfo
*
psfiSelected
=
NULL
;
#define NUM_ELEMS(x) (sizeof(x)/sizeof(*(x)))
static
void
init_shell_folder_listview_headers
(
HWND
dialog
)
{
LVCOLUMNW
listColumn
;
RECT
viewRect
;
...
...
@@ -763,8 +761,8 @@ static void read_shell_folder_link_targets(void) {
WCHAR
wszPath
[
MAX_PATH
];
HRESULT
hr
;
int
i
;
for
(
i
=
0
;
i
<
NUM_ELEMS
(
asfiInfo
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
asfiInfo
);
i
++
)
{
asfiInfo
[
i
].
szLinkTarget
[
0
]
=
'\0'
;
hr
=
SHGetFolderPathW
(
NULL
,
asfiInfo
[
i
].
nFolder
|
CSIDL_FLAG_DONT_VERIFY
,
NULL
,
SHGFP_TYPE_CURRENT
,
wszPath
);
...
...
@@ -790,7 +788,7 @@ static void update_shell_folder_listview(HWND dialog) {
SendDlgItemMessageW
(
dialog
,
IDC_LIST_SFPATHS
,
LVM_DELETEALLITEMS
,
0
,
0
);
for
(
i
=
0
;
i
<
NUM_ELEMS
(
asfiInfo
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
asfiInfo
);
i
++
)
{
WCHAR
buffer
[
MAX_PATH
];
HRESULT
hr
;
LPITEMIDLIST
pidlCurrent
;
...
...
@@ -905,7 +903,7 @@ static void apply_shell_folder_changes(void) {
struct
stat
statPath
;
HRESULT
hr
;
for
(
i
=
0
;
i
<
NUM_ELEMS
(
asfiInfo
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
asfiInfo
);
i
++
)
{
/* Ignore nonexistent link targets */
if
(
asfiInfo
[
i
].
szLinkTarget
[
0
]
&&
stat
(
asfiInfo
[
i
].
szLinkTarget
,
&
statPath
))
continue
;
...
...
programs/winecfg/winecfg.c
View file @
f051aa67
...
...
@@ -623,7 +623,7 @@ static void process_setting(struct setting *s)
static
const
WCHAR
softwareW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
};
HKEY
key
;
BOOL
needs_wow64
=
(
is_win64
&&
s
->
root
==
HKEY_LOCAL_MACHINE
&&
s
->
path
&&
!
strncmpiW
(
s
->
path
,
softwareW
,
sizeof
(
softwareW
)
/
sizeof
(
WCHAR
)
));
!
strncmpiW
(
s
->
path
,
softwareW
,
ARRAY_SIZE
(
softwareW
)
));
if
(
s
->
value
)
{
...
...
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