chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e967f5a
)
string-util: use size_t for strjoina macro (#6914)
author
Jonathan Lebon
<jlebon@users.noreply.github.com>
Mon, 25 Sep 2017 19:56:57 +0000
(15:56 -0400)
committer
Sven Eden
<yamakuzure@gmx.net>
Mon, 25 Sep 2017 19:56:57 +0000
(15:56 -0400)
`strlen` returns a `size_t` and `alloca` expects a `size_t`.
src/basic/string-util.h
patch
|
blob
|
history
diff --git
a/src/basic/string-util.h
b/src/basic/string-util.h
index a28ef9c4f777fa54886317281f42a3c0e4f195e4..19c8d8bb3ec3a8475380b0c18d76b75825f732f0 100644
(file)
--- a/
src/basic/string-util.h
+++ b/
src/basic/string-util.h
@@
-124,7
+124,7
@@
char *strjoin_real(const char *x, ...) _sentinel_;
({ \
const char *_appendees_[] = { a, __VA_ARGS__ }; \
char *_d_, *_p_; \
-
in
t _len_ = 0; \
+
size_
t _len_ = 0; \
unsigned _i_; \
for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \
_len_ += strlen(_appendees_[_i_]); \