mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 16:37:19 +09:00
string-util: use size_t for strjoina macro (#6914)
`strlen` returns a `size_t` and `alloca` expects a `size_t`.
This commit is contained in:
committed by
Lennart Poettering
parent
3594f80144
commit
35207e259e
@@ -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_]); \
|
||||
|
||||
Reference in New Issue
Block a user