Subject: bin/16869: sed shows pointer value when calling usage()
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jmmv@hispabsd.org>
List: netbsd-bugs
Date: 05/17/2002 19:20:03
>Number: 16869
>Category: bin
>Synopsis: sed shows pointer value when calling usage()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 17 10:21:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Julio Merino
>Release: NetBSD 1.5ZC
>Organization:
HispaBSD
>Environment:
System: NetBSD darkstar.local 1.5ZC NetBSD 1.5ZC (DARKSTAR) #37: Sun May 12 13:28:55 CEST 2002 juli@darkstar.local:/home/pub/NetBSD/src/sys/arch/i386/compile/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
When calling the sed tool with an invalid argument, it shows a
pointer where it should be the tool name.
>How-To-Repeat:
Try running 'sed -I', as -I is an unknown option.
>Fix:
Index: main.c
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/sed/main.c,v
retrieving revision 1.11
diff -u -u -r1.11 main.c
--- main.c 2002/01/23 19:07:34 1.11
+++ main.c 2002/05/17 17:15:25
@@ -139,7 +139,7 @@
default:
case '?':
(void)fprintf(stderr,
-"usage:\t%p script [-anE] [file ...]\n\tsed [-an] [-e script] ... [-f script_file] ... [file ...]\n",
+"usage:\t%s script [-anE] [file ...]\n\tsed [-an] [-e script] ... [-f script_file] ... [file ...]\n",
getprogname());
exit(1);
}
>Release-Note:
>Audit-Trail:
>Unformatted: