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.
This commit is contained in:
joerg 2015-09-12 19:11:13 +00:00
parent aa52694f67
commit 2bb600f982

View File

@ -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 @@ pack(void)
*/
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;