diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-02-21 07:32:56 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-02-21 07:32:56 +0000 |
commit | 1e969584d9a580f9e4a323e853604bbfe3fe0eb6 (patch) | |
tree | 72b76fab72d624cb203114c5f486f90fcf1a67b1 /usr.bin/write | |
parent | 64fc253682fe6c58db87b2d3937eac037505e58d (diff) |
use sizeof w/ defines; niklas@ millert@ ok.
Diffstat (limited to 'usr.bin/write')
-rw-r--r-- | usr.bin/write/write.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/write/write.c b/usr.bin/write/write.c index 7597973b31a..da5ebad1ee2 100644 --- a/usr.bin/write/write.c +++ b/usr.bin/write/write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: write.c,v 1.15 2002/02/16 21:27:59 millert Exp $ */ +/* $OpenBSD: write.c,v 1.16 2002/02/21 07:32:55 fgsch Exp $ */ /* $NetBSD: write.c,v 1.5 1995/08/31 21:48:32 jtc Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)write.c 8.2 (Berkeley) 4/27/95"; #endif -static char *rcsid = "$OpenBSD: write.c,v 1.15 2002/02/16 21:27:59 millert Exp $"; +static char *rcsid = "$OpenBSD: write.c,v 1.16 2002/02/21 07:32:55 fgsch Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -111,8 +111,8 @@ main(argc, argv) do_write(tty, mytty, myuid); break; case 3: - if (!strncmp(argv[2], _PATH_DEV, strlen(_PATH_DEV))) - argv[2] += strlen(_PATH_DEV); + if (!strncmp(argv[2], _PATH_DEV, sizeof(_PATH_DEV) - 1)) + argv[2] += sizeof(_PATH_DEV) - 1; if (utmp_chk(argv[1], argv[2])) errx(1, "%s is not logged in on %s", argv[1], argv[2]); |