diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2017-07-19 15:43:13 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2017-07-21 17:19:33 +0200 |
commit | c1a6e70d62aa14efab4bf41ce2230b76aa455807 (patch) | |
tree | 50d9c393df4f1bab15fdf2c3f2a5973cea6a8081 | |
parent | f1d03308d84944914318053314112cdfcc6222da (diff) | |
download | uid_wrapper-c1a6e70d62aa14efab4bf41ce2230b76aa455807.tar.gz uid_wrapper-c1a6e70d62aa14efab4bf41ce2230b76aa455807.tar.xz uid_wrapper-c1a6e70d62aa14efab4bf41ce2230b76aa455807.zip |
uwrap: Fix type of len value
snprintf return an 'int'.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | src/uid_wrapper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c index cdc725c..e623879 100644 --- a/src/uid_wrapper.c +++ b/src/uid_wrapper.c @@ -864,13 +864,13 @@ static void uwrap_export_ids(struct uwrap_thread *id) for (i = 0; i < id->ngroups; i++) { size_t groups_str_len = strlen(groups_str); size_t groups_str_avail = groups_str_size - groups_str_len; - size_t len; + int len; len = snprintf(unsigned_str, sizeof(unsigned_str), ",%u", id->groups[i]); if (len <= 1) { continue; } - if (len < groups_str_avail) { + if (((size_t)len) < groups_str_avail) { snprintf(groups_str + groups_str_len, groups_str_size - groups_str_len, "%s", |