diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-05-31 22:07:03 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-05-31 22:07:03 +0000 |
commit | 2c2c3a9c060b7e1aec22976c6a55f19ab784136f (patch) | |
tree | 3863f7050dfa8d728591f30b8751dee2b84df532 /pw/pw_group.c | |
parent | caf4ed8e2690f9dcb4095c3578fd113199869c88 (diff) | |
download | pw-darwin-2c2c3a9c060b7e1aec22976c6a55f19ab784136f.tar.gz pw-darwin-2c2c3a9c060b7e1aec22976c6a55f19ab784136f.tar.zst pw-darwin-2c2c3a9c060b7e1aec22976c6a55f19ab784136f.zip |
Remove useless cast in printf and printf-like functions:
use %u for uid_t and gid_t
Diffstat (limited to 'pw/pw_group.c')
-rw-r--r-- | pw/pw_group.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pw/pw_group.c b/pw/pw_group.c index 53757f5..37f2426 100644 --- a/pw/pw_group.c +++ b/pw/pw_group.c @@ -83,7 +83,7 @@ pw_group(struct userconf * cnf, int mode, struct cargs * args) gid_t next = gr_gidpolicy(cnf, args); if (getarg(args, 'q')) return next; - printf("%ld\n", (long)next); + printf("%u\n", next); return EXIT_SUCCESS; } @@ -137,7 +137,7 @@ pw_group(struct userconf * cnf, int mode, struct cargs * args) else if (rc != 0) { err(EX_IOERR, "group update"); } - pw_log(cnf, mode, W_GROUP, "%s(%ld) removed", a_name->val, (long) gid); + pw_log(cnf, mode, W_GROUP, "%s(%u) removed", a_name->val, gid); return EXIT_SUCCESS; } else if (mode == M_PRINT) return print_group(grp, getarg(args, 'P') != NULL); @@ -279,7 +279,7 @@ pw_group(struct userconf * cnf, int mode, struct cargs * args) if ((grp = GETGRNAM(arg->val)) == NULL) errx(EX_SOFTWARE, "group disappeared during update"); - pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid); + pw_log(cnf, mode, W_GROUP, "%s(%u)", grp->gr_name, grp->gr_gid); free(members); @@ -361,7 +361,7 @@ gr_gidpolicy(struct userconf * cnf, struct cargs * args) gid = (gid_t) atol(a_gid->val); if ((grp = GETGRGID(gid)) != NULL && getarg(args, 'o') == NULL) - errx(EX_DATAERR, "gid `%ld' has already been allocated", (long) grp->gr_gid); + errx(EX_DATAERR, "gid `%u' has already been allocated", grp->gr_gid); } else { struct bitmap bm; |