Skip to content

Commit 6ae7142

Browse files
committed
Removed trailing 0 from debug message in nxt_credential_get().
1 parent 822303e commit 6ae7142

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/nxt_credential.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ nxt_credential_get(nxt_task_t *task, nxt_mp_t *mp, nxt_credential_t *uc,
7474
end = msg + NXT_MAX_ERROR_STR;
7575

7676
for (i = 0; i < uc->ngroups; i++) {
77-
p = nxt_sprintf(p, end, "%d%c", uc->gids[i],
78-
i+1 < uc->ngroups ? ',' : '\0');
77+
p = nxt_sprintf(p, end, "%d,", uc->gids[i]);
78+
}
79+
80+
if (uc->ngroups > 0) {
81+
p--;
7982
}
8083

8184
nxt_debug(task, "user \"%s\" has gids:%*s", uc->user, p - msg, msg);

0 commit comments

Comments
 (0)