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
89277068
Commit
89277068
authored
Jul 20, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcpl.cpl: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b45f9488
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
connections.c
dlls/inetcpl.cpl/connections.c
+4
-5
general.c
dlls/inetcpl.cpl/general.c
+2
-2
security.c
dlls/inetcpl.cpl/security.c
+5
-5
No files found.
dlls/inetcpl.cpl/connections.c
View file @
89277068
...
@@ -273,13 +273,12 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
...
@@ -273,13 +273,12 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
}
}
TRACE
(
"ProxyEnable set to %x
\n
"
,
use_proxy
);
TRACE
(
"ProxyEnable set to %x
\n
"
,
use_proxy
);
proxy_len
=
GetDlgItemTextW
(
hwnd
,
IDC_EDIT_PROXY_SERVER
,
proxy_len
=
GetDlgItemTextW
(
hwnd
,
IDC_EDIT_PROXY_SERVER
,
proxy
,
ARRAY_SIZE
(
proxy
));
proxy
,
sizeof
(
proxy
)
/
sizeof
(
proxy
[
0
]));
if
(
proxy_len
)
if
(
proxy_len
)
{
{
proxy
[
proxy_len
++
]
=
':'
;
proxy
[
proxy_len
++
]
=
':'
;
port_len
=
GetDlgItemTextW
(
hwnd
,
IDC_EDIT_PROXY_PORT
,
port_len
=
GetDlgItemTextW
(
hwnd
,
IDC_EDIT_PROXY_PORT
,
proxy
+
proxy_len
,
proxy
+
proxy_len
,
sizeof
(
proxy
)
/
sizeof
(
proxy
[
0
]
)
-
proxy_len
);
ARRAY_SIZE
(
proxy
)
-
proxy_len
);
if
(
!
port_len
)
if
(
!
port_len
)
{
{
proxy
[
proxy_len
++
]
=
'8'
;
proxy
[
proxy_len
++
]
=
'8'
;
...
@@ -305,7 +304,7 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
...
@@ -305,7 +304,7 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
use_pac_script
=
IsDlgButtonChecked
(
hwnd
,
IDC_USE_PAC_SCRIPT
);
use_pac_script
=
IsDlgButtonChecked
(
hwnd
,
IDC_USE_PAC_SCRIPT
);
pac_script_len
=
GetDlgItemTextW
(
hwnd
,
IDC_EDIT_PAC_SCRIPT
,
pac_script_len
=
GetDlgItemTextW
(
hwnd
,
IDC_EDIT_PAC_SCRIPT
,
pac_script
,
sizeof
(
pac_script
)
/
sizeof
(
pac_script
[
0
]
));
pac_script
,
ARRAY_SIZE
(
pac_script
));
if
(
!
pac_script_len
)
use_pac_script
=
FALSE
;
if
(
!
pac_script_len
)
use_pac_script
=
FALSE
;
if
(
use_pac_script
)
if
(
use_pac_script
)
{
{
...
...
dlls/inetcpl.cpl/general.c
View file @
89277068
...
@@ -263,10 +263,10 @@ static INT_PTR general_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
...
@@ -263,10 +263,10 @@ static INT_PTR general_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
if
(
psn
->
hdr
.
code
==
PSN_APPLY
)
if
(
psn
->
hdr
.
code
==
PSN_APPLY
)
{
{
*
buffer
=
0
;
*
buffer
=
0
;
GetDlgItemTextW
(
hwnd
,
IDC_HOME_EDIT
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
));
GetDlgItemTextW
(
hwnd
,
IDC_HOME_EDIT
,
buffer
,
ARRAY_SIZE
(
buffer
));
TRACE
(
"EDITTEXT has %s
\n
"
,
debugstr_w
(
buffer
));
TRACE
(
"EDITTEXT has %s
\n
"
,
debugstr_w
(
buffer
));
res
=
parse_url_from_outside
(
buffer
,
parsed
,
sizeof
(
parsed
)
/
sizeof
(
WCHAR
));
res
=
parse_url_from_outside
(
buffer
,
parsed
,
ARRAY_SIZE
(
parsed
));
TRACE
(
"got %d with %s
\n
"
,
res
,
debugstr_w
(
parsed
));
TRACE
(
"got %d with %s
\n
"
,
res
,
debugstr_w
(
parsed
));
if
(
res
)
if
(
res
)
...
...
dlls/inetcpl.cpl/security.c
View file @
89277068
...
@@ -73,7 +73,7 @@ static DWORD url_templates[] = {URLTEMPLATE_CUSTOM,
...
@@ -73,7 +73,7 @@ static DWORD url_templates[] = {URLTEMPLATE_CUSTOM,
static
DWORD
index_from_urltemplate
(
URLTEMPLATE
value
)
static
DWORD
index_from_urltemplate
(
URLTEMPLATE
value
)
{
{
DWORD
index
=
sizeof
(
url_templates
)
/
sizeof
(
url_templates
[
0
]
);
DWORD
index
=
ARRAY_SIZE
(
url_templates
);
while
((
index
>
0
)
&&
(
url_templates
[
index
-
1
]
!=
value
))
while
((
index
>
0
)
&&
(
url_templates
[
index
-
1
]
!=
value
))
index
--
;
index
--
;
...
@@ -105,12 +105,12 @@ static void update_security_level(secdlg_data *sd, DWORD lv_index, DWORD tb_inde
...
@@ -105,12 +105,12 @@ static void update_security_level(secdlg_data *sd, DWORD lv_index, DWORD tb_inde
current_index
=
(
tb_index
>
0
)
?
tb_index
:
index_from_urltemplate
(
sd
->
levels
[
lv_index
]);
current_index
=
(
tb_index
>
0
)
?
tb_index
:
index_from_urltemplate
(
sd
->
levels
[
lv_index
]);
name
[
0
]
=
0
;
name
[
0
]
=
0
;
LoadStringW
(
hcpl
,
IDS_SEC_LEVEL0
+
current_index
,
name
,
sizeof
(
name
)
/
sizeof
(
name
[
0
]
));
LoadStringW
(
hcpl
,
IDS_SEC_LEVEL0
+
current_index
,
name
,
ARRAY_SIZE
(
name
));
TRACE
(
"new level #%d: %s
\n
"
,
current_index
,
debugstr_w
(
name
));
TRACE
(
"new level #%d: %s
\n
"
,
current_index
,
debugstr_w
(
name
));
SetWindowTextW
(
GetDlgItem
(
sd
->
hsec
,
IDC_SEC_LEVEL
),
name
);
SetWindowTextW
(
GetDlgItem
(
sd
->
hsec
,
IDC_SEC_LEVEL
),
name
);
name
[
0
]
=
0
;
name
[
0
]
=
0
;
LoadStringW
(
hcpl
,
IDS_SEC_LEVEL0_INFO
+
(
current_index
*
0x10
),
name
,
sizeof
(
name
)
/
sizeof
(
name
[
0
]
));
LoadStringW
(
hcpl
,
IDS_SEC_LEVEL0_INFO
+
(
current_index
*
0x10
),
name
,
ARRAY_SIZE
(
name
));
TRACE
(
"new level info: %s
\n
"
,
debugstr_w
(
name
));
TRACE
(
"new level info: %s
\n
"
,
debugstr_w
(
name
));
SetWindowTextW
(
GetDlgItem
(
sd
->
hsec
,
IDC_SEC_LEVEL_INFO
),
name
);
SetWindowTextW
(
GetDlgItem
(
sd
->
hsec
,
IDC_SEC_LEVEL_INFO
),
name
);
...
@@ -134,8 +134,8 @@ static void update_zone_info(secdlg_data *sd, DWORD lv_index)
...
@@ -134,8 +134,8 @@ static void update_zone_info(secdlg_data *sd, DWORD lv_index)
SetWindowTextW
(
GetDlgItem
(
sd
->
hsec
,
IDC_SEC_ZONE_INFO
),
za
->
szDescription
);
SetWindowTextW
(
GetDlgItem
(
sd
->
hsec
,
IDC_SEC_ZONE_INFO
),
za
->
szDescription
);
len
=
LoadStringW
(
hcpl
,
IDS_SEC_SETTINGS
,
name
,
sizeof
(
name
)
/
sizeof
(
*
name
));
len
=
LoadStringW
(
hcpl
,
IDS_SEC_SETTINGS
,
name
,
ARRAY_SIZE
(
name
));
lstrcpynW
(
&
name
[
len
],
za
->
szDisplayName
,
sizeof
(
name
)
/
sizeof
(
*
name
)
-
len
-
1
);
lstrcpynW
(
&
name
[
len
],
za
->
szDisplayName
,
ARRAY_SIZE
(
name
)
-
len
-
1
);
TRACE
(
"new title: %s
\n
"
,
debugstr_w
(
name
));
TRACE
(
"new title: %s
\n
"
,
debugstr_w
(
name
));
SetWindowTextW
(
GetDlgItem
(
sd
->
hsec
,
IDC_SEC_GROUP
),
name
);
SetWindowTextW
(
GetDlgItem
(
sd
->
hsec
,
IDC_SEC_GROUP
),
name
);
...
...
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