diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-04-25 07:45:15 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-05-15 15:29:58 +0200 |
commit | de0671ee7fe465e108f62dcbbbe9366f81dd9e9a (patch) | |
tree | 3ee30af44852655c365104703359b47a6e6219b5 /src/shared/util.c | |
parent | 12ed81d9c88406234c20e9261ae8c8b992d8bc4d (diff) |
Remove unnecessary casts in printfs
No functional change expected :)
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index d1dc476ab6..020c1da7a9 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -2499,7 +2499,7 @@ static char *lookup_uid(uid_t uid) { if (getpwuid_r(uid, &pwbuf, buf, bufsize, &pw) == 0 && pw) return strdup(pw->pw_name); - if (asprintf(&name, "%lu", (unsigned long) uid) < 0) + if (asprintf(&name, UID_FMT, uid) < 0) return NULL; return name; @@ -2624,7 +2624,7 @@ int get_ctty(pid_t pid, dev_t *_devnr, char **r) { /* This is an ugly hack */ if (major(devnr) == 136) { - asprintf(&b, "pts/%lu", (unsigned long) minor(devnr)); + asprintf(&b, "pts/%u", minor(devnr)); goto finish; } @@ -4299,7 +4299,7 @@ char* uid_to_name(uid_t uid) { if (p) return strdup(p->pw_name); - if (asprintf(&r, "%lu", (unsigned long) uid) < 0) + if (asprintf(&r, UID_FMT, uid) < 0) return NULL; return r; @@ -4316,7 +4316,7 @@ char* gid_to_name(gid_t gid) { if (p) return strdup(p->gr_name); - if (asprintf(&r, "%lu", (unsigned long) gid) < 0) + if (asprintf(&r, GID_FMT, gid) < 0) return NULL; return r; |