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
b3a5662c
Commit
b3a5662c
authored
Oct 11, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdsapi: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b0a64a81
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
ntdsapi.c
dlls/ntdsapi/ntdsapi.c
+1
-2
ntdsapi.c
dlls/ntdsapi/tests/ntdsapi.c
+12
-12
No files found.
dlls/ntdsapi/ntdsapi.c
View file @
b3a5662c
...
...
@@ -130,10 +130,9 @@ DWORD WINAPI DsMakeSpnW(LPCWSTR svc_class, LPCWSTR svc_name,
if
(
inst_port
)
{
static
const
WCHAR
percentU
[]
=
{
'%'
,
'u'
,
0
};
*
p
=
':'
;
p
++
;
wsprintfW
(
p
,
percentU
,
inst_port
);
wsprintfW
(
p
,
L"%u"
,
inst_port
);
p
+=
lstrlenW
(
p
);
}
...
...
dlls/ntdsapi/tests/ntdsapi.c
View file @
b3a5662c
...
...
@@ -33,15 +33,15 @@ static void test_DsMakeSpn(void)
DWORD
ret
;
WCHAR
spn
[
256
];
DWORD
spn_length
;
static
const
WCHAR
wszServiceClass
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
0
}
;
static
const
WCHAR
wszServiceHost
[]
=
{
'h'
,
'o'
,
's'
,
't'
,
0
}
;
static
const
WCHAR
wszInstanceName
[]
=
{
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'n'
,
'c'
,
'e'
,
0
}
;
static
const
WCHAR
wszReferrer
[]
=
{
'r'
,
'e'
,
'f'
,
'e'
,
'r'
,
'r'
,
'e'
,
'r'
,
0
}
;
static
const
WCHAR
wszSpn1
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'/'
,
'h'
,
'o'
,
's'
,
't'
,
0
}
;
static
const
WCHAR
wszSpn2
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'/'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'n'
,
'c'
,
'e'
,
'/'
,
'h'
,
'o'
,
's'
,
't'
,
0
}
;
static
const
WCHAR
wszSpn3
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'/'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'n'
,
'c'
,
'e'
,
':'
,
'5'
,
'5'
,
'5'
,
'/'
,
'h'
,
'o'
,
's'
,
't'
,
0
}
;
static
const
WCHAR
wszSpn4
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'/'
,
'i'
,
'n'
,
's'
,
't'
,
'a'
,
'n'
,
'c'
,
'e'
,
':'
,
'5'
,
'5'
,
'5'
,
'/'
,
'h'
,
'o'
,
's'
,
't'
,
0
}
;
static
const
WCHAR
wszSpn5
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'/'
,
'h'
,
'o'
,
's'
,
't'
,
':'
,
'5'
,
'5'
,
'5'
,
0
}
;
static
const
WCHAR
wszServiceClass
[]
=
L"class"
;
static
const
WCHAR
wszServiceHost
[]
=
L"host"
;
static
const
WCHAR
wszInstanceName
[]
=
L"instance"
;
static
const
WCHAR
wszReferrer
[]
=
L"referrer"
;
static
const
WCHAR
wszSpn1
[]
=
L"class/host"
;
static
const
WCHAR
wszSpn2
[]
=
L"class/instance/host"
;
static
const
WCHAR
wszSpn3
[]
=
L"class/instance:555/host"
;
static
const
WCHAR
wszSpn4
[]
=
L"class/instance:555/host"
;
static
const
WCHAR
wszSpn5
[]
=
L"class/host:555"
;
spn
[
0
]
=
'\0'
;
...
...
@@ -86,9 +86,9 @@ static void test_DsMakeSpn(void)
static
void
test_DsClientMakeSpnForTargetServer
(
void
)
{
static
const
WCHAR
classW
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
0
}
;
static
const
WCHAR
hostW
[]
=
{
'h'
,
'o'
,
's'
,
't'
,
'.'
,
'd'
,
'o'
,
'm'
,
'a'
,
'i'
,
'n'
,
0
}
;
static
const
WCHAR
resultW
[]
=
{
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'/'
,
'h'
,
'o'
,
's'
,
't'
,
'.'
,
'd'
,
'o'
,
'm'
,
'a'
,
'i'
,
'n'
,
0
}
;
static
const
WCHAR
classW
[]
=
L"class"
;
static
const
WCHAR
hostW
[]
=
L"host.domain"
;
static
const
WCHAR
resultW
[]
=
L"class/host.domain"
;
DWORD
ret
,
len
;
WCHAR
buf
[
256
];
...
...
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