Module Name:    src
Committed By:   christos
Date:           Fri Oct 21 00:41:35 UTC 2011

Modified Files:
        src/tests/lib/libc/regex: t_exhaust.c

Log Message:
simplify.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/regex/t_exhaust.c

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

Modified files:

Index: src/tests/lib/libc/regex/t_exhaust.c
diff -u src/tests/lib/libc/regex/t_exhaust.c:1.1 src/tests/lib/libc/regex/t_exhaust.c:1.2
--- src/tests/lib/libc/regex/t_exhaust.c:1.1	Sun Oct  9 14:21:08 2011
+++ src/tests/lib/libc/regex/t_exhaust.c	Thu Oct 20 20:41:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_exhaust.c,v 1.1 2011/10/09 18:21:08 christos Exp $	*/
+/*	$NetBSD: t_exhaust.c,v 1.2 2011/10/21 00:41:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_exhaust.c,v 1.1 2011/10/09 18:21:08 christos Exp $");
+__RCSID("$NetBSD: t_exhaust.c,v 1.2 2011/10/21 00:41:34 christos Exp $");
 
 #include <stdio.h>
 #include <regex.h>
@@ -178,12 +178,12 @@ ATF_TC_BODY(regcomp_too_big, tc)
 		char *d = (*patterns[i])(9999);
 		e = regcomp(&re, d, i == 6 ? REG_BASIC : REG_EXTENDED);
 		free(d);
-		if (e != 0)
+		if (e) {
 			ATF_REQUIRE_MSG(e == REG_ESPACE,
 			    "regcomp returned %d for pattern %zu", e, i);
-		if (e)
 			continue;
-		e = regexec(&re, "aaaaaaaa", 0, NULL, 0);
+		}
+		(void)regexec(&re, "aaaaaaaa", 0, NULL, 0);
 		regfree(&re);
 	}
 }

Reply via email to