Source-Changes-HG archive

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

[src/pgoyette-compat]: src/sys/kern Reverse order of flags checking to appeas...



details:   https://anonhg.NetBSD.org/src/rev/384b0343be30
branches:  pgoyette-compat
changeset: 321185:384b0343be30
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Jul 09 08:26:29 2018 +0000

description:
Reverse order of flags checking to appease compiler.  It seems
that gcc doesn't like

        if (expr && !ISSET(t, f)) ...

diffstat:

 sys/kern/kern_module.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r db01d09b61ab -r 384b0343be30 sys/kern/kern_module.c
--- a/sys/kern/kern_module.c    Sun Jul 08 07:33:14 2018 +0000
+++ b/sys/kern/kern_module.c    Mon Jul 09 08:26:29 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_module.c,v 1.130.2.11 2018/07/08 07:33:14 pgoyette Exp $  */
+/*     $NetBSD: kern_module.c,v 1.130.2.12 2018/07/09 08:26:29 pgoyette Exp $  */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.130.2.11 2018/07/08 07:33:14 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.130.2.12 2018/07/09 08:26:29 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -1039,8 +1039,8 @@
                }
        }
        if (mod) {
-               if (ISSET(mod->mod_flags, MODFLG_MUST_FORCE)) &&
-                   !ISSET(flags, MODCTL_LOAD_FORCE)) {
+               if (!ISSET(flags, MODCTL_LOAD_FORCE) &&
+                   ISSET(mod->mod_flags, MODFLG_MUST_FORCE)) {
                        if (!autoload) {
                                module_error("use -f to reinstate "
                                    "builtin module `%s'", name);



Home | Main Index | Thread Index | Old Index