summaryrefslogtreecommitdiff
path: root/src/commands/whoami.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/commands/whoami.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/whoami.c b/src/commands/whoami.c
index f19a724..623a35a 100644
--- a/src/commands/whoami.c
+++ b/src/commands/whoami.c
@@ -2,14 +2,14 @@
#include <pwd.h>
-static void help() {
+static void help(void) {
printf("Usage: whoami\n\n");
printf("Print the username associated with the current effective user id\n");
exit(EXIT_SUCCESS);
}
COMMAND(whoami) {
- if (argc > 0 && streql("--help", argv[0])) help();
+ parse_help(argc, argv, help);
uid_t usr = getuid();
struct passwd* passwd = getpwuid(usr);