summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2001-05-20 08:15:03 +0000
committermickey <mickey@openbsd.org>2001-05-20 08:15:03 +0000
commitdb29666d49231b0dbab899fe664810441a925395 (patch)
tree4059c493b96a2e53a5e1bf8d676bf8876ce8d70c
parenttrade 3 exits for return (diff)
downloadwireguard-openbsd-db29666d49231b0dbab899fe664810441a925395.tar.xz
wireguard-openbsd-db29666d49231b0dbab899fe664810441a925395.zip
exit and use __progname
-rw-r--r--bin/stty/stty.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/stty/stty.c b/bin/stty/stty.c
index d4a011e99fc..55c22250461 100644
--- a/bin/stty/stty.c
+++ b/bin/stty/stty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stty.c,v 1.7 2000/10/06 02:49:55 aaron Exp $ */
+/* $OpenBSD: stty.c,v 1.8 2001/05/20 08:15:03 mickey Exp $ */
/* $NetBSD: stty.c,v 1.11 1995/03/21 09:11:30 cgd Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)stty.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: stty.c,v 1.7 2000/10/06 02:49:55 aaron Exp $";
+static char rcsid[] = "$OpenBSD: stty.c,v 1.8 2001/05/20 08:15:03 mickey Exp $";
#endif
#endif /* not lint */
@@ -154,13 +154,14 @@ args: argc -= optind;
err(1, "tcsetattr");
if (i.wset && ioctl(i.fd, TIOCSWINSZ, &i.win) < 0)
warn("TIOCSWINSZ");
- exit(0);
+ return (0);
}
void
usage()
{
-
- (void)fprintf(stderr, "usage: stty [-a|-e|-g] [-f file] [operands]\n");
+ extern char *__progname;
+ fprintf(stderr, "usage: %s [-a|-e|-g] [-f file] [operands]\n",
+ __progname);
exit (1);
}