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
c6932e24
Commit
c6932e24
authored
Nov 15, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Use the wcsdup function instead of reimplementing it.
parent
26be4fb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
22 deletions
+4
-22
provider.c
dlls/localspl/provider.c
+4
-22
No files found.
dlls/localspl/provider.c
View file @
c6932e24
...
...
@@ -276,24 +276,6 @@ static const DWORD di_sizeof[] = {0, sizeof(DRIVER_INFO_1W), sizeof(DRIVER_INFO_
/******************************************************************
* strdupW [internal]
*
* create a copy of a unicode-string
*
*/
static
LPWSTR
strdupW
(
LPCWSTR
p
)
{
LPWSTR
ret
;
DWORD
len
;
if
(
!
p
)
return
NULL
;
len
=
(
wcslen
(
p
)
+
1
)
*
sizeof
(
WCHAR
);
ret
=
malloc
(
len
);
if
(
ret
)
memcpy
(
ret
,
p
,
len
);
return
ret
;
}
/******************************************************************
* apd_copyfile [internal]
*
* Copy a file from the driverdirectory to the versioned directory
...
...
@@ -618,8 +600,8 @@ static monitor_t * monitor_load(LPCWSTR name, LPWSTR dllname)
WARN
(
"%s not found
\n
"
,
debugstr_w
(
regroot
));
}
pm
->
name
=
strdupW
(
name
);
pm
->
dllname
=
strdupW
(
driver
);
pm
->
name
=
wcsdup
(
name
);
pm
->
dllname
=
wcsdup
(
driver
);
if
((
name
&&
(
!
regroot
||
!
pm
->
name
))
||
!
pm
->
dllname
)
{
monitor_unload
(
pm
);
...
...
@@ -1427,10 +1409,10 @@ static HANDLE printer_alloc_handle(LPCWSTR name, LPPRINTER_DEFAULTSW pDefault)
if
(
!
printer
)
goto
end
;
/* clone the base name. This is NULL for the printserver */
printer
->
printername
=
strdupW
(
printername
);
printer
->
printername
=
wcsdup
(
printername
);
/* clone the full name */
printer
->
name
=
strdupW
(
name
);
printer
->
name
=
wcsdup
(
name
);
if
(
name
&&
(
!
printer
->
name
))
{
printer_free
(
printer
);
printer
=
NULL
;
...
...
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