Code cleanup
This commit is contained in:
parent
a8f6d8366f
commit
02d40b2210
6
src/ls.c
6
src/ls.c
|
@ -571,11 +571,11 @@ static void _long_mode(char str[11], mode_t mode)
|
||||||
|
|
||||||
static char const * _long_owner(uid_t uid)
|
static char const * _long_owner(uid_t uid)
|
||||||
{
|
{
|
||||||
struct passwd * pwd;
|
|
||||||
static char buf[12];
|
static char buf[12];
|
||||||
|
struct passwd * pw;
|
||||||
|
|
||||||
if((pwd = getpwuid(uid)) != NULL)
|
if((pw = getpwuid(uid)) != NULL)
|
||||||
return pwd->pw_name;
|
return pw->pw_name;
|
||||||
snprintf(buf, sizeof(buf), "%u", uid);
|
snprintf(buf, sizeof(buf), "%u", uid);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user