diff options
Diffstat (limited to 'src/whoami.c')
-rw-r--r-- | src/whoami.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/whoami.c b/src/whoami.c index 972cd5539..9b75b3646 100644 --- a/src/whoami.c +++ b/src/whoami.c @@ -25,6 +25,7 @@ #include <getopt.h> #include "system.h" +#include "die.h" #include "error.h" #include "long-options.h" #include "quote.h" @@ -84,11 +85,8 @@ main (int argc, char **argv) uid = geteuid (); pw = (uid == NO_UID && errno ? NULL : getpwuid (uid)); if (!pw) - { - error (0, errno, _("cannot find name for user ID %lu"), - (unsigned long int) uid); - exit (EXIT_FAILURE); - } + die (EXIT_FAILURE, errno, _("cannot find name for user ID %lu"), + (unsigned long int) uid); puts (pw->pw_name); return EXIT_SUCCESS; } |