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
973ac43d
Commit
973ac43d
authored
Jul 09, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
credui: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2f4f1399
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
credui_main.c
dlls/credui/credui_main.c
+10
-10
No files found.
dlls/credui/credui_main.c
View file @
973ac43d
...
...
@@ -206,7 +206,7 @@ static void CredDialogCreateBalloonTip(HWND hwndDlg, struct cred_dialog_params *
SetWindowPos
(
params
->
hwndBalloonTip
,
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_NOACTIVATE
);
if
(
!
LoadStringW
(
hinstCredUI
,
IDS_INCORRECTPASSWORD
,
wszText
,
sizeof
(
wszText
)
/
sizeof
(
wszText
[
0
]
)))
if
(
!
LoadStringW
(
hinstCredUI
,
IDS_INCORRECTPASSWORD
,
wszText
,
ARRAY_SIZE
(
wszText
)))
{
ERR
(
"failed to load IDS_INCORRECTPASSWORD
\n
"
);
return
;
...
...
@@ -223,7 +223,7 @@ static void CredDialogCreateBalloonTip(HWND hwndDlg, struct cred_dialog_params *
toolinfo
.
lpReserved
=
NULL
;
SendMessageW
(
params
->
hwndBalloonTip
,
TTM_ADDTOOLW
,
0
,
(
LPARAM
)
&
toolinfo
);
if
(
!
LoadStringW
(
hinstCredUI
,
IDS_CAPSLOCKON
,
wszText
,
sizeof
(
wszText
)
/
sizeof
(
wszText
[
0
]
)))
if
(
!
LoadStringW
(
hinstCredUI
,
IDS_CAPSLOCKON
,
wszText
,
ARRAY_SIZE
(
wszText
)))
{
ERR
(
"failed to load IDS_CAPSLOCKON
\n
"
);
return
;
...
...
@@ -251,7 +251,7 @@ static void CredDialogShowIncorrectPasswordBalloon(HWND hwndDlg, struct cred_dia
if
(
params
->
fBalloonTipActive
)
return
;
if
(
!
LoadStringW
(
hinstCredUI
,
IDS_INCORRECTPASSWORDTITLE
,
wszTitle
,
sizeof
(
wszTitle
)
/
sizeof
(
wszTitle
[
0
]
)))
if
(
!
LoadStringW
(
hinstCredUI
,
IDS_INCORRECTPASSWORDTITLE
,
wszTitle
,
ARRAY_SIZE
(
wszTitle
)))
{
ERR
(
"failed to load IDS_INCORRECTPASSWORDTITLE
\n
"
);
return
;
...
...
@@ -289,7 +289,7 @@ static void CredDialogShowCapsLockBalloon(HWND hwndDlg, struct cred_dialog_param
if
(
params
->
fBalloonTipActive
)
return
;
if
(
!
LoadStringW
(
hinstCredUI
,
IDS_CAPSLOCKONTITLE
,
wszTitle
,
sizeof
(
wszTitle
)
/
sizeof
(
wszTitle
[
0
]
)))
if
(
!
LoadStringW
(
hinstCredUI
,
IDS_CAPSLOCKONTITLE
,
wszTitle
,
ARRAY_SIZE
(
wszTitle
)))
{
ERR
(
"failed to load IDS_IDSCAPSLOCKONTITLE
\n
"
);
return
;
...
...
@@ -383,8 +383,8 @@ static BOOL CredDialogInit(HWND hwndDlg, struct cred_dialog_params *params)
{
WCHAR
format
[
256
];
WCHAR
message
[
256
];
LoadStringW
(
hinstCredUI
,
IDS_MESSAGEFORMAT
,
format
,
sizeof
(
format
)
/
sizeof
(
format
[
0
]
));
snprintfW
(
message
,
sizeof
(
message
)
/
sizeof
(
message
[
0
]
),
format
,
params
->
pszTargetName
);
LoadStringW
(
hinstCredUI
,
IDS_MESSAGEFORMAT
,
format
,
ARRAY_SIZE
(
format
));
snprintfW
(
message
,
ARRAY_SIZE
(
message
),
format
,
params
->
pszTargetName
);
SetDlgItemTextW
(
hwndDlg
,
IDC_MESSAGE
,
message
);
}
SetWindowTextW
(
hwndUsername
,
params
->
pszUsername
);
...
...
@@ -408,8 +408,8 @@ static BOOL CredDialogInit(HWND hwndDlg, struct cred_dialog_params *params)
{
WCHAR
format
[
256
];
WCHAR
title
[
256
];
LoadStringW
(
hinstCredUI
,
IDS_TITLEFORMAT
,
format
,
sizeof
(
format
)
/
sizeof
(
format
[
0
]
));
snprintfW
(
title
,
sizeof
(
title
)
/
sizeof
(
title
[
0
]
),
format
,
params
->
pszTargetName
);
LoadStringW
(
hinstCredUI
,
IDS_TITLEFORMAT
,
format
,
ARRAY_SIZE
(
format
));
snprintfW
(
title
,
ARRAY_SIZE
(
title
),
format
,
params
->
pszTargetName
);
SetWindowTextW
(
hwndDlg
,
title
);
}
...
...
@@ -867,8 +867,8 @@ ULONG SEC_ENTRY SspiPromptForCredentialsW( PCWSTR target, void *info,
static
const
WCHAR
negotiateW
[]
=
{
'N'
,
'e'
,
'g'
,
'o'
,
't'
,
'i'
,
'a'
,
't'
,
'e'
,
0
};
WCHAR
username
[
CREDUI_MAX_USERNAME_LENGTH
+
1
]
=
{
0
};
WCHAR
password
[
CREDUI_MAX_PASSWORD_LENGTH
+
1
]
=
{
0
};
DWORD
len_username
=
sizeof
(
username
)
/
sizeof
(
username
[
0
]
);
DWORD
len_password
=
sizeof
(
password
)
/
sizeof
(
password
[
0
]
);
DWORD
len_username
=
ARRAY_SIZE
(
username
);
DWORD
len_password
=
ARRAY_SIZE
(
password
);
DWORD
ret
,
flags
;
CREDUI_INFOW
*
cred_info
=
info
;
SEC_WINNT_AUTH_IDENTITY_W
*
id
=
input_id
;
...
...
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