Module Name:    src
Committed By:   christos
Date:           Sun Sep 22 20:34:26 UTC 2024

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

Log Message:
Set the default to "infinity" and use ~0 so we don't need to count f's.
(Brad Harder)


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/nbperf/nbperf.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/nbperf/nbperf.c
diff -u src/usr.bin/nbperf/nbperf.c:1.8 src/usr.bin/nbperf/nbperf.c:1.9
--- src/usr.bin/nbperf/nbperf.c:1.8	Fri Feb  2 17:33:42 2024
+++ src/usr.bin/nbperf/nbperf.c	Sun Sep 22 16:34:26 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: nbperf.c,v 1.8 2024/02/02 22:33:42 andvar Exp $	*/
+/*	$NetBSD: nbperf.c,v 1.9 2024/09/22 20:34:26 christos Exp $	*/
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: nbperf.c,v 1.8 2024/02/02 22:33:42 andvar Exp $");
+__RCSID("$NetBSD: nbperf.c,v 1.9 2024/09/22 20:34:26 christos Exp $");
 
 #include <sys/endian.h>
 #include <err.h>
@@ -127,7 +127,7 @@ main(int argc, char **argv)
 	size_t line_allocated;
 	const void **keys = NULL;
 	size_t *keylens = NULL;
-	uint32_t max_iterations = 0xffffffU;
+	uint32_t max_iterations = ~0U;
 	long long tmp;
 	int looped, ch;
 	int (*build_hash)(struct nbperf *) = chm_compute;
@@ -259,7 +259,7 @@ main(int argc, char **argv)
 		if (!looped)
 			nbperf.check_duplicates = 1;
 		looped = 1;
-		if (max_iterations == 0xffffffffU)
+		if (max_iterations == ~0U)
 			continue;
 		if (--max_iterations == 0) {
 			fputc('\n', stderr);

Reply via email to