Skip to content
Snippets Groups Projects
Commit 292cfc80 authored by Jonathan Lebon's avatar Jonathan Lebon Committed by Colin Walters
Browse files

macros: use size_t for glnx_strjoina len

This was in my workspace for a while.
`strlen` returns a `size_t` and `alloca` expects a `size_t`.
parent 5ee2f1be
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ G_BEGIN_DECLS ...@@ -38,7 +38,7 @@ G_BEGIN_DECLS
({ \ ({ \
const char *_appendees_[] = { a, __VA_ARGS__ }; \ const char *_appendees_[] = { a, __VA_ARGS__ }; \
char *_d_, *_p_; \ char *_d_, *_p_; \
int _len_ = 0; \ size_t _len_ = 0; \
unsigned _i_; \ unsigned _i_; \
for (_i_ = 0; _i_ < G_N_ELEMENTS(_appendees_) && _appendees_[_i_]; _i_++) \ for (_i_ = 0; _i_ < G_N_ELEMENTS(_appendees_) && _appendees_[_i_]; _i_++) \
_len_ += strlen(_appendees_[_i_]); \ _len_ += strlen(_appendees_[_i_]); \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment