Skip to content

Commit 0e4f97b

Browse files
src/newgrp.c: Remove redundant comment
The usage() function already documents the syntax. Let's keep a single source of truth. Signed-off-by: Alejandro Colomar <alx@kernel.org>
1 parent 23acca2 commit 0e4f97b

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/newgrp.c

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,14 @@ static void check_perms (const struct group *grp,
6464
const char *groupname);
6565
static void syslog_sg (const char *name, const char *group);
6666

67-
/*
68-
* usage - print command usage message
69-
*/
70-
static void usage (void)
67+
68+
static void
69+
usage(void)
7170
{
72-
if (is_newgrp) {
73-
(void) fputs (_("Usage: newgrp [-l|-] [group]\n"), stderr);
74-
} else {
75-
(void) fputs (_("Usage: sg [-l|-] group [[-c] command]\n"), stderr);
76-
}
71+
if (is_newgrp)
72+
fputs(_("Usage: newgrp [-l|-] [group]\n"), stderr);
73+
else
74+
fputs(_("Usage: sg [-l|-] group [[-c] command]\n"), stderr);
7775
}
7876

7977
static bool ingroup(const char *name, struct group *gr)
@@ -449,11 +447,6 @@ main(int argc, char *argv[argc + 1])
449447
}
450448
name = pwd->pw_name;
451449

452-
/*
453-
* Synopsis
454-
* newgrp [-l|-] [groupid]
455-
* sg [-l|-] groupid [[-c] command]
456-
*/
457450
if (*argv != NULL && (streq(*argv, "-l") || streq(*argv, "-"))) {
458451
argv++;
459452
initflag = true;

0 commit comments

Comments
 (0)