Module Name:    src
Committed By:   christos
Date:           Sun Aug 14 09:38:05 UTC 2011

Modified Files:
        src/bin/ed: main.c

Log Message:
eliminate non-literal format string.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/ed/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ed/main.c
diff -u src/bin/ed/main.c:1.23 src/bin/ed/main.c:1.24
--- src/bin/ed/main.c:1.23	Mon May 23 19:13:10 2011
+++ src/bin/ed/main.c	Sun Aug 14 05:38:05 2011
@@ -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 */
 		}

Reply via email to