summaryrefslogtreecommitdiffstats
path: root/usr.bin/write
diff options
context:
space:
mode:
authoralex <alex@FreeBSD.org>1996-10-26 15:29:24 +0000
committeralex <alex@FreeBSD.org>1996-10-26 15:29:24 +0000
commit20338edbdcfe8876581ff2cd98989fb2a634a663 (patch)
tree1e0258b758c176f2ebc599c851c4b92677f11695 /usr.bin/write
parentbd28e36b038e8d15462f77cf751261467a219e69 (diff)
downloadFreeBSD-src-20338edbdcfe8876581ff2cd98989fb2a634a663.zip
FreeBSD-src-20338edbdcfe8876581ff2cd98989fb2a634a663.tar.gz
Replace hardcoded length of "/dev/" with strlen(_PATH_DEV).
Pointed out by: bde
Diffstat (limited to 'usr.bin/write')
-rw-r--r--usr.bin/write/write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/write/write.c b/usr.bin/write/write.c
index 601663b..dd0248d 100644
--- a/usr.bin/write/write.c
+++ b/usr.bin/write/write.c
@@ -104,7 +104,7 @@ main(argc, argv)
break;
case 3:
if (!strncmp(argv[2], _PATH_DEV, strlen(_PATH_DEV)))
- argv[2] += 5;
+ argv[2] += strlen(_PATH_DEV);
if (utmp_chk(argv[1], argv[2])) {
(void)fprintf(stderr,
"write: %s is not logged in on %s.\n",
OpenPOWER on IntegriCloud