Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/config Negating an integer and comparing it to 1 is ...
details: https://anonhg.NetBSD.org/src/rev/4e4731c98cb5
branches: trunk
changeset: 340554:4e4731c98cb5
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Sep 12 19:11:13 2015 +0000
description:
Negating an integer and comparing it to 1 is a fancy way of checking for
0, which in this case would be DEVI_ORPHAN. That clearly can't be the
intention here, so switch to using != as operation without negation
instead.
diffstat:
usr.bin/config/pack.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r f37f16a2510f -r 4e4731c98cb5 usr.bin/config/pack.c
--- a/usr.bin/config/pack.c Sat Sep 12 19:08:47 2015 +0000
+++ b/usr.bin/config/pack.c Sat Sep 12 19:11:13 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pack.c,v 1.9 2014/10/29 17:14:50 christos Exp $ */
+/* $NetBSD: pack.c,v 1.10 2015/09/12 19:11:13 joerg Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pack.c,v 1.9 2014/10/29 17:14:50 christos Exp $");
+__RCSID("$NetBSD: pack.c,v 1.10 2015/09/12 19:11:13 joerg Exp $");
#include <sys/param.h>
#include <stdlib.h>
@@ -119,7 +119,7 @@
*/
locspace = 0;
TAILQ_FOREACH(i, &alldevi, i_next) {
- if (!i->i_active == DEVI_ACTIVE || i->i_collapsed)
+ if (i->i_active != DEVI_ACTIVE || i->i_collapsed)
continue;
if ((p = i->i_pspec) == NULL)
continue;
Home |
Main Index |
Thread Index |
Old Index