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
baf4cb39
Commit
baf4cb39
authored
Jul 18, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3ba9ba7a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
schannel.c
dlls/secur32/schannel.c
+4
-4
schannel_gnutls.c
dlls/secur32/schannel_gnutls.c
+1
-1
schannel_macosx.c
dlls/secur32/schannel_macosx.c
+2
-2
secur32.c
dlls/secur32/secur32.c
+2
-2
No files found.
dlls/secur32/schannel.c
View file @
baf4cb39
...
...
@@ -195,7 +195,7 @@ static void read_config(void)
if
(
res
==
ERROR_SUCCESS
)
{
DWORD
type
,
size
,
value
;
for
(
i
=
0
;
i
<
sizeof
(
protocol_config_keys
)
/
sizeof
(
*
protocol_config_keys
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
protocol_config_keys
);
i
++
)
{
strcpyW
(
subkey_name
,
protocol_config_keys
[
i
].
key_name
);
strcatW
(
subkey_name
,
clientW
);
res
=
RegOpenKeyExW
(
protocols_key
,
subkey_name
,
0
,
KEY_READ
,
&
key
);
...
...
@@ -229,7 +229,7 @@ static void read_config(void)
}
}
else
{
/* No config, enable all known protocols. */
for
(
i
=
0
;
i
<
sizeof
(
protocol_config_keys
)
/
sizeof
(
*
protocol_config_keys
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
protocol_config_keys
);
i
++
)
{
if
(
protocol_config_keys
[
i
].
enabled
)
enabled
|=
protocol_config_keys
[
i
].
prot_client_flag
;
if
(
protocol_config_keys
[
i
].
disabled_by_default
)
...
...
@@ -986,7 +986,7 @@ static void *get_alg_name(ALG_ID id, BOOL wide)
};
unsigned
i
;
for
(
i
=
0
;
i
<
sizeof
(
alg_name_map
)
/
sizeof
(
alg_name_map
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
alg_name_map
);
i
++
)
if
(
alg_name_map
[
i
].
alg_id
==
id
)
return
wide
?
(
void
*
)
alg_name_map
[
i
].
nameW
:
(
void
*
)
alg_name_map
[
i
].
name
;
...
...
@@ -1545,7 +1545,7 @@ void SECUR32_initSchannelSP(void)
goto
fail
;
}
SECUR32_addPackages
(
provider
,
sizeof
(
info
)
/
sizeof
(
info
[
0
]
),
NULL
,
info
);
SECUR32_addPackages
(
provider
,
ARRAY_SIZE
(
info
),
NULL
,
info
);
return
;
...
...
dlls/secur32/schannel_gnutls.c
View file @
baf4cb39
...
...
@@ -177,7 +177,7 @@ BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cre
}
p
=
priority
+
strlen
(
priority
);
for
(
i
=
0
;
i
<
sizeof
(
protocol_priority_flags
)
/
sizeof
(
*
protocol_priority_flags
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
protocol_priority_flags
);
i
++
)
{
*
p
++
=
':'
;
*
p
++
=
(
cred
->
enabled_protocols
&
protocol_priority_flags
[
i
].
enable_flag
)
?
'+'
:
'-'
;
strcpy
(
p
,
protocol_priority_flags
[
i
].
gnutls_flag
);
...
...
dlls/secur32/schannel_macosx.c
View file @
baf4cb39
...
...
@@ -429,7 +429,7 @@ static const struct cipher_suite cipher_suites[] = {
static
const
struct
cipher_suite
*
get_cipher_suite
(
SSLCipherSuite
cipher_suite
)
{
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
cipher_suites
)
/
sizeof
(
cipher_suites
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
cipher_suites
);
i
++
)
{
if
(
cipher_suites
[
i
].
suite
==
cipher_suite
)
return
&
cipher_suites
[
i
];
...
...
@@ -767,7 +767,7 @@ BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cre
goto
fail
;
}
for
(
i
=
0
;
i
<
sizeof
(
protocol_priority_flags
)
/
sizeof
(
*
protocol_priority_flags
);
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
protocol_priority_flags
);
i
++
)
{
if
(
!
(
protocol_priority_flags
[
i
].
enable_flag
&
supported_protocols
))
continue
;
...
...
dlls/secur32/secur32.c
View file @
baf4cb39
...
...
@@ -995,7 +995,7 @@ BOOLEAN WINAPI GetComputerObjectNameW(
case
NameSamCompatible
:
{
WCHAR
name
[
MAX_COMPUTERNAME_LENGTH
+
1
];
DWORD
size
=
sizeof
(
name
)
/
sizeof
(
name
[
0
]
);
DWORD
size
=
ARRAY_SIZE
(
name
);
if
(
GetComputerNameW
(
name
,
&
size
))
{
DWORD
len
=
domainInfo
->
Name
.
Length
+
size
+
3
;
...
...
@@ -1038,7 +1038,7 @@ BOOLEAN WINAPI GetComputerObjectNameW(
DWORD
len
,
size
;
WCHAR
*
suffix
;
size
=
sizeof
(
name
)
/
sizeof
(
name
[
0
]
);
size
=
ARRAY_SIZE
(
name
);
if
(
!
GetComputerNameW
(
name
,
&
size
))
{
status
=
FALSE
;
...
...
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