changeset 182:ed26d3529575

Patch from Charlie Shepherd: remove extra \n from error_exit() arguments.
author Rob Landley <rob@landley.net>
date Tue, 27 Nov 2007 01:41:32 -0600
parents 78d93164a9d2
children 93899f7c3e0c
files lib/args.c main.c toys/help.c
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/args.c	Tue Nov 27 01:36:50 2007 -0600
+++ b/lib/args.c	Tue Nov 27 01:41:32 2007 -0600
@@ -81,7 +81,7 @@
 	int type;
 
 	// Did we recognize this option?
-	if (!gof.this && !gof.noerror) error_exit("Unknown option %s\n", gof.arg);
+	if (!gof.this && !gof.noerror) error_exit("Unknown option %s", gof.arg);
 	else toys.optflags |= 1 << gof.this->shift;
 
 	// Does this option take an argument?
--- a/main.c	Tue Nov 27 01:36:50 2007 -0600
+++ b/main.c	Tue Nov 27 01:41:32 2007 -0600
@@ -94,7 +94,7 @@
 	if (toys.argv[1]) {
 		if (toys.argv[1][0]!='-') {
 			toy_exec(toys.argv+1);
-			error_exit("Unknown command %s\n",toys.argv[1]);
+			error_exit("Unknown command %s",toys.argv[1]);
 		}
 	}
 
--- a/toys/help.c	Tue Nov 27 01:36:50 2007 -0600
+++ b/toys/help.c	Tue Nov 27 01:41:32 2007 -0600
@@ -20,7 +20,7 @@
 	int i = t-toy_list;
 	char *s = help_data;
 
-	if (!t) error_exit("Unknown command '%s'\n", *toys.optargs);
+	if (!t) error_exit("Unknown command '%s'", *toys.optargs);
 	for (;;) {
 		while (i--) s += strlen(s) + 1;
 		if (*s != 255) break;