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
4a6fb030
Commit
4a6fb030
authored
Aug 17, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac.drv: Use length returned from sprintfW().
A minor optimization. Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
97519459
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
display.c
dlls/winemac.drv/display.c
+3
-2
No files found.
dlls/winemac.drv/display.c
View file @
4a6fb030
...
...
@@ -1630,6 +1630,7 @@ static BOOL macdrv_init_monitor(HDEVINFO devinfo, const struct macdrv_monitor *m
SP_DEVINFO_DATA
device_data
=
{
sizeof
(
SP_DEVINFO_DATA
)};
WCHAR
nameW
[
MAX_PATH
];
WCHAR
bufferW
[
MAX_PATH
];
DWORD
length
;
HKEY
hkey
;
RECT
rect
;
BOOL
ret
=
FALSE
;
...
...
@@ -1677,9 +1678,9 @@ static BOOL macdrv_init_monitor(HDEVINFO devinfo, const struct macdrv_monitor *m
(
const
BYTE
*
)
&
rect
,
sizeof
(
rect
),
0
))
goto
done
;
/* Adapter name */
sprintfW
(
bufferW
,
adapter_name_fmtW
,
video_index
+
1
);
length
=
sprintfW
(
bufferW
,
adapter_name_fmtW
,
video_index
+
1
);
if
(
!
SetupDiSetDevicePropertyW
(
devinfo
,
&
device_data
,
&
WINE_DEVPROPKEY_MONITOR_ADAPTERNAME
,
DEVPROP_TYPE_STRING
,
(
const
BYTE
*
)
bufferW
,
(
l
strlenW
(
bufferW
)
+
1
)
*
sizeof
(
WCHAR
),
0
))
(
const
BYTE
*
)
bufferW
,
(
l
ength
+
1
)
*
sizeof
(
WCHAR
),
0
))
goto
done
;
ret
=
TRUE
;
...
...
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