From 20338edbdcfe8876581ff2cd98989fb2a634a663 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 26 Oct 1996 15:29:24 +0000 Subject: Replace hardcoded length of "/dev/" with strlen(_PATH_DEV). Pointed out by: bde --- usr.bin/write/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/write') 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", -- cgit v1.1