Module Name:    src
Committed By:   pooka
Date:           Sat Feb 13 22:57:03 UTC 2010

Modified Files:
        src/usr.bin/config: main.c

Log Message:
Fix off-by-one (config -x works again) and improve editing artifacts
(actually the whole "config -x must be used alone" change was made
unnecessary along the way.  cest la vie).


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/usr.bin/config/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/usr.bin/config/main.c
diff -u src/usr.bin/config/main.c:1.37 src/usr.bin/config/main.c:1.38
--- src/usr.bin/config/main.c:1.37	Wed Feb  3 21:00:49 2010
+++ src/usr.bin/config/main.c	Sat Feb 13 22:57:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.37 2010/02/03 21:00:49 pooka Exp $	*/
+/*	$NetBSD: main.c,v 1.38 2010/02/13 22:57:03 pooka Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -212,9 +212,8 @@
 		}
 	}
 
-	if (optind != 1) {
-		if (xflag)
-			errx(EXIT_FAILURE, "-x must be used alone");
+	if (xflag && optind != 2) {
+		errx(EXIT_FAILURE, "-x must be used alone");
 	}
 
 	argc -= optind;

Reply via email to