Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ed eliminate non-literal format string.



details:   https://anonhg.NetBSD.org/src/rev/aef943b80613
branches:  trunk
changeset: 768300:aef943b80613
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Aug 14 09:38:05 2011 +0000

description:
eliminate non-literal format string.

diffstat:

 bin/ed/main.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 6b18f3069430 -r aef943b80613 bin/ed/main.c
--- a/bin/ed/main.c     Sun Aug 14 09:07:37 2011 +0000
+++ b/bin/ed/main.c     Sun Aug 14 09:38:05 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.23 2011/05/23 23:13:10 joerg Exp $  */
+/*     $NetBSD: main.c,v 1.24 2011/08/14 09:38:05 christos Exp $       */
 
 /* main.c: This file contains the main control and user-interface routines
    for the ed line editor. */
@@ -39,7 +39,7 @@
 #if 0
 static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
 #else
-__RCSID("$NetBSD: main.c,v 1.23 2011/05/23 23:13:10 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.24 2011/08/14 09:38:05 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -104,7 +104,6 @@
 const char *prompt;                    /* command-line prompt */
 const char *dps = "*";         /* default command-line prompt */
 
-const char *usage = "usage: %s [-] [-sxE] [-p string] [name]\n";
 
 /* ed: line editor */
 int
@@ -137,7 +136,9 @@
                        ere = REG_EXTENDED;
                        break;
                default:
-                       fprintf(stderr, usage, argv[0]);
+                       fprintf(stderr, 
+                           "Usage: %s [-] [-sxE] [-p string] [name]\n",
+                           getprogname());
                        exit(1);
                        /* NOTREACHED */
                }



Home | Main Index | Thread Index | Old Index