Module Name:    src
Committed By:   riastradh
Date:           Sun Jul 17 13:10:04 UTC 2022

Modified Files:
        src/sys/dev/wsfb: genfb.c

Log Message:
genfb(4): KASSERT(a && b) -> KASSERT(a); KASSERT(b)

Better diagnostics.  No other functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/wsfb/genfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.87 src/sys/dev/wsfb/genfb.c:1.88
--- src/sys/dev/wsfb/genfb.c:1.87	Sat Jul  9 13:37:12 2022
+++ src/sys/dev/wsfb/genfb.c	Sun Jul 17 13:10:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.87 2022/07/09 13:37:12 rin Exp $ */
+/*	$NetBSD: genfb.c,v 1.88 2022/07/17 13:10:04 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.87 2022/07/09 13:37:12 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.88 2022/07/17 13:10:04 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -608,7 +608,8 @@ genfb_init_screen(void *cookie, struct v
 			ri->ri_bpos = bits * 2;
 		} else if (is_swapped) {
 			/* byte-swapped, must be 32 bpp */
-			KASSERT(ri->ri_depth == 32 && bits == 8);
+			KASSERT(ri->ri_depth == 32);
+			KASSERT(bits == 8);
 			ri->ri_rpos = 8;
 			ri->ri_gpos = 16;
 			ri->ri_bpos = 24;
@@ -879,8 +880,8 @@ genfb_brightness_up(device_t dev)
 {
 	struct genfb_softc *sc = device_private(dev);
 
-	KASSERT(sc->sc_brightness != NULL &&
-		sc->sc_brightness->gpc_upd_parameter != NULL);
+	KASSERT(sc->sc_brightness != NULL);
+	KASSERT(sc->sc_brightness->gpc_upd_parameter != NULL);
 
 	(void)sc->sc_brightness->gpc_upd_parameter(
 	    sc->sc_brightness->gpc_cookie, GENFB_BRIGHTNESS_STEP);
@@ -891,8 +892,8 @@ genfb_brightness_down(device_t dev)
 {
 	struct genfb_softc *sc = device_private(dev);
 
-	KASSERT(sc->sc_brightness != NULL &&
-		sc->sc_brightness->gpc_upd_parameter != NULL);
+	KASSERT(sc->sc_brightness != NULL);
+	KASSERT(sc->sc_brightness->gpc_upd_parameter != NULL);
 
 	(void)sc->sc_brightness->gpc_upd_parameter(
 	    sc->sc_brightness->gpc_cookie, - GENFB_BRIGHTNESS_STEP);

Reply via email to