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
b762bd7b
Commit
b762bd7b
authored
Jul 24, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clock: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
094f5b42
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
main.c
programs/clock/main.c
+2
-2
winclock.c
programs/clock/winclock.c
+2
-2
No files found.
programs/clock/main.c
View file @
b762bd7b
...
...
@@ -72,7 +72,7 @@ static VOID CLOCK_UpdateWindowCaption(VOID)
/* Set frame caption */
if
(
Globals
.
bDate
)
{
chars
=
GetDateFormatW
(
LOCALE_USER_DEFAULT
,
DATE_LONGDATE
,
NULL
,
NULL
,
szCaption
,
sizeof
(
szCaption
)
/
sizeof
(
WCHAR
));
szCaption
,
ARRAY_SIZE
(
szCaption
));
if
(
chars
)
{
--
chars
;
szCaption
[
chars
++
]
=
' '
;
...
...
@@ -255,7 +255,7 @@ static int CLOCK_MenuCommand (WPARAM wParam)
}
/* show "about" box */
case
IDM_ABOUT
:
{
LoadStringW
(
Globals
.
hInstance
,
IDS_CLOCK
,
szApp
,
sizeof
(
szApp
)
/
sizeof
(
WCHAR
));
LoadStringW
(
Globals
.
hInstance
,
IDS_CLOCK
,
szApp
,
ARRAY_SIZE
(
szApp
));
lstrcpyW
(
szAppRelease
,
szApp
);
ShellAboutW
(
Globals
.
hMainWnd
,
szApp
,
szAppRelease
,
0
);
break
;
...
...
programs/clock/winclock.c
View file @
b762bd7b
...
...
@@ -187,7 +187,7 @@ HFONT SizeFont(HDC dc, int x, int y, BOOL bSeconds, const LOGFONTW* font)
int
chars
;
chars
=
GetTimeFormatW
(
LOCALE_USER_DEFAULT
,
bSeconds
?
0
:
TIME_NOSECONDS
,
NULL
,
NULL
,
szTime
,
sizeof
(
szTime
)
/
sizeof
(
WCHAR
));
NULL
,
szTime
,
ARRAY_SIZE
(
szTime
));
if
(
!
chars
)
return
0
;
...
...
@@ -219,7 +219,7 @@ void DigitalClock(HDC dc, int x, int y, BOOL bSeconds, HFONT font)
int
chars
;
chars
=
GetTimeFormatW
(
LOCALE_USER_DEFAULT
,
bSeconds
?
0
:
TIME_NOSECONDS
,
NULL
,
NULL
,
szTime
,
sizeof
(
szTime
)
/
sizeof
(
WCHAR
));
NULL
,
szTime
,
ARRAY_SIZE
(
szTime
));
if
(
!
chars
)
return
;
--
chars
;
...
...
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