Use macro instead if hardcoded value

This commit is contained in:
Arun Prakash Jana 2018-05-19 01:36:17 +05:30
parent 8a1786c49f
commit f19bf5bbad
No known key found for this signature in database
GPG key ID: A75979F35C080412

4
nnn.c
View file

@ -1736,7 +1736,7 @@ xgetpwuid(uid_t uid)
{ {
struct passwd *pwd = getpwuid(uid); struct passwd *pwd = getpwuid(uid);
if (!pwd) if (!pwd)
return utils[7]; return utils[UNKNOWN];
return pwd->pw_name; return pwd->pw_name;
} }
@ -1746,7 +1746,7 @@ xgetgrgid(gid_t gid)
{ {
struct group *grp = getgrgid(gid); struct group *grp = getgrgid(gid);
if (!grp) if (!grp)
return utils[7]; return utils[UNKNOWN];
return grp->gr_name; return grp->gr_name;
} }