From: Jonathan Lebon Date: Mon, 25 Sep 2017 19:56:57 +0000 (-0400) Subject: string-util: use size_t for strjoina macro (#6914) X-Git-Tag: v235~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35207e259ef44f62faf71acc4bbc7d43311a4583;p=platform%2Fupstream%2Fsystemd.git string-util: use size_t for strjoina macro (#6914) `strlen` returns a `size_t` and `alloca` expects a `size_t`. --- diff --git a/src/basic/string-util.h b/src/basic/string-util.h index 34eb952..c511aee 100644 --- a/src/basic/string-util.h +++ b/src/basic/string-util.h @@ -120,7 +120,7 @@ char *strjoin_real(const char *x, ...) _sentinel_; ({ \ const char *_appendees_[] = { a, __VA_ARGS__ }; \ char *_d_, *_p_; \ - int _len_ = 0; \ + size_t _len_ = 0; \ unsigned _i_; \ for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \ _len_ += strlen(_appendees_[_i_]); \