Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/nbperf Fix sanity check to match the fixed off-by-on...



details:   https://anonhg.NetBSD.org/src/rev/0cff93fb365a
branches:  trunk
changeset: 980232:0cff93fb365a
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Jan 28 18:52:43 2021 +0000

description:
Fix sanity check to match the fixed off-by-one logic in the sizing
logic.

diffstat:

 usr.bin/nbperf/graph2.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (34 lines):

diff -r 50f575dafc0e -r 0cff93fb365a usr.bin/nbperf/graph2.c
--- a/usr.bin/nbperf/graph2.c   Thu Jan 28 17:40:00 2021 +0000
+++ b/usr.bin/nbperf/graph2.c   Thu Jan 28 18:52:43 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: graph2.c,v 1.5 2021/01/07 16:03:08 joerg Exp $ */
+/*     $NetBSD: graph2.c,v 1.6 2021/01/28 18:52:43 joerg Exp $ */
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: graph2.c,v 1.5 2021/01/07 16:03:08 joerg Exp $");
+__RCSID("$NetBSD: graph2.c,v 1.6 2021/01/28 18:52:43 joerg Exp $");
 
 #include <err.h>
 #include <inttypes.h>
@@ -180,11 +180,11 @@
        size_t i, j;
 
 #if GRAPH_SIZE == 2
-       if (nbperf->allow_hash_fudging && (graph->v & 1) != 1)
-               errx(1, "vertex count must have lowest bit set");
+       if (nbperf->allow_hash_fudging && (graph->v & 1) != 0)
+               errx(1, "vertex count must have lowest bit clear");
 #else
-       if (nbperf->allow_hash_fudging && (graph->v & 3) != 3)
-               errx(1, "vertex count must have lowest 2 bits set");
+       if (nbperf->allow_hash_fudging && (graph->v & 3) != 0)
+               errx(1, "vertex count must have lowest 2 bits clear");
 #endif
 
 



Home | Main Index | Thread Index | Old Index