diff options
Diffstat (limited to 'usr.bin/wall/wall.c')
-rw-r--r-- | usr.bin/wall/wall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c index 4506386..25cb786 100644 --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -126,8 +126,10 @@ main(int argc, char *argv[]) for (g = grouplist; g; g = g->next) { grp = getgrnam(g->name); - if (grp) + if (grp != NULL) g->gid = grp->gr_gid; + else + warnx("%s: no such group", g->name); } makemsg(*argv); @@ -170,7 +172,7 @@ main(int argc, char *argv[]) static void usage() { - (void)fprintf(stderr, "usage: wall [file]\n"); + (void)fprintf(stderr, "usage: wall [-g group] [file]\n"); exit(1); } |