projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7770033
)
macro: change DECIMAL_STR_WIDTH() return type to size_t, like strlen() and so on
author
Lennart Poettering
<lennart@poettering.net>
Thu, 29 Jul 2021 16:47:04 +0000
(18:47 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 30 Jul 2021 13:59:29 +0000
(15:59 +0200)
src/basic/macro.h
patch
|
blob
|
history
diff --git
a/src/basic/macro.h
b/src/basic/macro.h
index 829d8dc8a7093c7dae8e0e137d264e63b0fdadbb..90f4e02d190fedca3b8131d41499c67c16fce9ea 100644
(file)
--- a/
src/basic/macro.h
+++ b/
src/basic/macro.h
@@
-350,7
+350,7
@@
static inline int __coverity_check_and_return__(int condition) {
#define DECIMAL_STR_WIDTH(x) \
({ \
typeof(x) _x_ = (x); \
-
unsigned ans = 1;
\
+
size_t ans = 1;
\
while ((_x_ /= 10) != 0) \
ans++; \
ans; \