Module Name:    src
Committed By:   riastradh
Date:           Wed Jan 23 20:39:46 UTC 2013

Modified Files:
        src/usr.bin/fsplit: fsplit.c

Log Message:
Assert equality, not assignment, in fsplit, and say who guarantees it.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/fsplit/fsplit.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/fsplit/fsplit.c
diff -u src/usr.bin/fsplit/fsplit.c:1.28 src/usr.bin/fsplit/fsplit.c:1.29
--- src/usr.bin/fsplit/fsplit.c:1.28	Fri Sep 16 15:39:26 2011
+++ src/usr.bin/fsplit/fsplit.c	Wed Jan 23 20:39:46 2013
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "from: @(#)fsplit.c	8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: fsplit.c,v 1.28 2011/09/16 15:39:26 joerg Exp $");
+__RCSID("$NetBSD: fsplit.c,v 1.29 2013/01/23 20:39:46 riastradh Exp $");
 #endif
 #endif /* not lint */
 
@@ -235,9 +235,10 @@ saveit(const char *name)
 	}
 	strlcpy(fname, name, sizeof(fname));
 	fnamelen = strlen(fname);
+        /* Guaranteed by scan_name.  */
 	assert(fnamelen > 2);
-	assert(fname[fnamelen-2] = '.');
-	assert(fname[fnamelen-1] = 'f');
+	assert(fname[fnamelen-2] == '.');
+	assert(fname[fnamelen-1] == 'f');
 	fname[fnamelen-2] = '\0';
 
 	for (i = 0; i < numextonly; i++) {

Reply via email to