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
1 changed files with 2 additions and 2 deletions

4
nnn.c
View File

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