Fixed error handling and TRUE/FALSE usage.
This commit is contained in:
parent
2dab174daa
commit
e8c55f42c1
@ -35,8 +35,7 @@ extern int whoami_main(int argc, char **argv)
|
|||||||
my_getpwuid(user, uid);
|
my_getpwuid(user, uid);
|
||||||
if (user) {
|
if (user) {
|
||||||
puts(user);
|
puts(user);
|
||||||
exit(TRUE);
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
errorMsg("cannot find username for UID %u\n", (unsigned) uid);
|
fatalError("cannot find username for UID %u\n", (unsigned) uid);
|
||||||
return(FALSE);
|
|
||||||
}
|
}
|
||||||
|
5
whoami.c
5
whoami.c
@ -35,8 +35,7 @@ extern int whoami_main(int argc, char **argv)
|
|||||||
my_getpwuid(user, uid);
|
my_getpwuid(user, uid);
|
||||||
if (user) {
|
if (user) {
|
||||||
puts(user);
|
puts(user);
|
||||||
exit(TRUE);
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
errorMsg("cannot find username for UID %u\n", (unsigned) uid);
|
fatalError("cannot find username for UID %u\n", (unsigned) uid);
|
||||||
return(FALSE);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user