Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/w Skip bracket processing if -n is used.
details: https://anonhg.NetBSD.org/src/rev/11d0348b333c
branches: trunk
changeset: 936685:11d0348b333c
user: kim <kim%NetBSD.org@localhost>
date: Sat Aug 01 17:53:38 2020 +0000
description:
Skip bracket processing if -n is used.
XXX: This could be improved to skip even more processing.
diffstat:
usr.bin/w/w.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d8e47ee389ef -r 11d0348b333c usr.bin/w/w.c
--- a/usr.bin/w/w.c Sat Aug 01 17:51:18 2020 +0000
+++ b/usr.bin/w/w.c Sat Aug 01 17:53:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: w.c,v 1.89 2020/08/01 17:25:57 kim Exp $ */
+/* $NetBSD: w.c,v 1.90 2020/08/01 17:53:38 kim Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)w.c 8.6 (Berkeley) 6/30/94";
#else
-__RCSID("$NetBSD: w.c,v 1.89 2020/08/01 17:25:57 kim Exp $");
+__RCSID("$NetBSD: w.c,v 1.90 2020/08/01 17:53:38 kim Exp $");
#endif
#endif /* not lint */
@@ -654,7 +654,7 @@
* Leading '[' indicates an IP address inside brackets.
*/
b = NULL;
- if (*p == '[') {
+ if (!nflag && (*p == '[')) {
for (b = p++; b < &host_buf[sizeof(host_buf)]; b++)
if (*b == '\0' || *b == ']')
break;
Home |
Main Index |
Thread Index |
Old Index