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
93acf3a6
Commit
93acf3a6
authored
Oct 25, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libs/wine: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
af399237
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
debug.c
libs/wine/debug.c
+4
-4
No files found.
libs/wine/debug.c
View file @
93acf3a6
...
...
@@ -144,7 +144,7 @@ static void parse_options( const char *str )
if
(
p
>
opt
)
{
for
(
i
=
0
;
i
<
sizeof
(
debug_classes
)
/
sizeof
(
debug_classes
[
0
]
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
debug_classes
);
i
++
)
{
int
len
=
strlen
(
debug_classes
[
i
]);
if
(
len
!=
(
p
-
opt
))
continue
;
...
...
@@ -155,7 +155,7 @@ static void parse_options( const char *str )
break
;
}
}
if
(
i
==
sizeof
(
debug_classes
)
/
sizeof
(
debug_classes
[
0
]
))
/* bad class name, skip it */
if
(
i
==
ARRAY_SIZE
(
debug_classes
))
/* bad class name, skip it */
continue
;
}
else
...
...
@@ -268,7 +268,7 @@ static char *get_temp_buffer( size_t size )
char
*
ret
;
int
idx
;
idx
=
interlocked_xchg_add
(
&
pos
,
1
)
%
(
sizeof
(
list
)
/
sizeof
(
list
[
0
])
);
idx
=
interlocked_xchg_add
(
&
pos
,
1
)
%
ARRAY_SIZE
(
list
);
if
((
ret
=
realloc
(
list
[
idx
],
size
)))
list
[
idx
]
=
ret
;
return
ret
;
}
...
...
@@ -411,7 +411,7 @@ static int default_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_ch
ret
+=
wine_dbg_printf
(
"%04x:"
,
GetCurrentProcessId
()
);
ret
+=
wine_dbg_printf
(
"%04x:"
,
GetCurrentThreadId
()
);
#endif
if
(
cls
<
sizeof
(
debug_classes
)
/
sizeof
(
debug_classes
[
0
]
))
if
(
cls
<
ARRAY_SIZE
(
debug_classes
))
ret
+=
wine_dbg_printf
(
"%s:%s:%s "
,
debug_classes
[
cls
],
channel
->
name
,
func
);
if
(
format
)
ret
+=
funcs
.
dbg_vprintf
(
format
,
args
);
...
...
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