aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-07-29 18:47:04 +0200
committerLennart Poettering <lennart@poettering.net>2021-07-30 15:59:29 +0200
commitd844529dc7a6c40d17d8ce74091dce1ec77d65b6 (patch)
tree1bd450729f56c85e5ceb6a78fa1807f7c51f081d
parentmacro: sizeof() returns size_t, and that's good (diff)
downloadsystemd-d844529dc7a6c40d17d8ce74091dce1ec77d65b6.tar.xz
systemd-d844529dc7a6c40d17d8ce74091dce1ec77d65b6.zip
macro: change DECIMAL_STR_WIDTH() return type to size_t, like strlen() and so on
-rw-r--r--src/basic/macro.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h
index 829d8dc8a70..90f4e02d190 100644
--- 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; \