summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-01-03 03:06:51 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-01-03 03:06:51 +0000
commit572170f4744760c745ce4ed73269e8c2ff690fbe (patch)
treedbfe4d6249245b70ffeb939e487bfffb267a6356
parent63ecd40fb6e7b156559dde585e15d2e786548984 (diff)
Don't use != 0 to check whether a pointer is non-NULL.
-rw-r--r--sys/arch/arm/cortex/ampintc.c4
-rw-r--r--sys/arch/armv7/broadcom/bcm2836_intr.c4
-rw-r--r--sys/arch/armv7/omap/intc.c4
-rw-r--r--sys/arch/armv7/sunxi/sxiintc.c4
-rw-r--r--sys/arch/riscv64/dev/plic.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/sys/arch/arm/cortex/ampintc.c b/sys/arch/arm/cortex/ampintc.c
index d1b4a9795ab..9689599948a 100644
--- a/sys/arch/arm/cortex/ampintc.c
+++ b/sys/arch/arm/cortex/ampintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ampintc.c,v 1.29 2021/03/25 04:12:00 jsg Exp $ */
+/* $OpenBSD: ampintc.c,v 1.30 2022/01/03 03:06:49 jsg Exp $ */
/*
* Copyright (c) 2007,2009,2011 Dale Rahn <drahn@openbsd.org>
*
@@ -668,7 +668,7 @@ ampintc_irq_handler(void *frame)
KERNEL_LOCK();
#endif
- if (ih->ih_arg != 0)
+ if (ih->ih_arg)
arg = ih->ih_arg;
else
arg = frame;
diff --git a/sys/arch/armv7/broadcom/bcm2836_intr.c b/sys/arch/armv7/broadcom/bcm2836_intr.c
index c2d3ea8e733..799985b0d1c 100644
--- a/sys/arch/armv7/broadcom/bcm2836_intr.c
+++ b/sys/arch/armv7/broadcom/bcm2836_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcm2836_intr.c,v 1.7 2021/10/24 17:52:27 mpi Exp $ */
+/* $OpenBSD: bcm2836_intr.c,v 1.8 2022/01/03 03:06:49 jsg Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2015 Patrick Wildt <patrick@blueri.se>
@@ -455,7 +455,7 @@ bcm_intc_call_handler(int irq, void *frame)
pri = sc->sc_bcm_intc_handler[irq].is_irq;
s = bcm_intc_splraise(pri);
TAILQ_FOREACH(ih, &sc->sc_bcm_intc_handler[irq].is_list, ih_list) {
- if (ih->ih_arg != 0)
+ if (ih->ih_arg)
arg = ih->ih_arg;
else
arg = frame;
diff --git a/sys/arch/armv7/omap/intc.c b/sys/arch/armv7/omap/intc.c
index 892a7d1b297..67de5ba0bce 100644
--- a/sys/arch/armv7/omap/intc.c
+++ b/sys/arch/armv7/omap/intc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intc.c,v 1.11 2021/10/24 17:52:27 mpi Exp $ */
+/* $OpenBSD: intc.c,v 1.12 2022/01/03 03:06:50 jsg Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -337,7 +337,7 @@ intc_irq_handler(void *frame)
pri = intc_handler[irq].iq_irq;
s = intc_splraise(pri);
TAILQ_FOREACH(ih, &intc_handler[irq].iq_list, ih_list) {
- if (ih->ih_arg != 0)
+ if (ih->ih_arg)
arg = ih->ih_arg;
else
arg = frame;
diff --git a/sys/arch/armv7/sunxi/sxiintc.c b/sys/arch/armv7/sunxi/sxiintc.c
index b9759def203..9764a635d27 100644
--- a/sys/arch/armv7/sunxi/sxiintc.c
+++ b/sys/arch/armv7/sunxi/sxiintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxiintc.c,v 1.10 2021/10/24 17:52:28 mpi Exp $ */
+/* $OpenBSD: sxiintc.c,v 1.11 2022/01/03 03:06:50 jsg Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2013 Artturi Alm
@@ -359,7 +359,7 @@ sxiintc_irq_handler(void *frame)
pr | (1 << IRQ2BIT32(irq)));
TAILQ_FOREACH(ih, &sxiintc_handler[irq].iq_list, ih_list) {
- if (ih->ih_arg != 0)
+ if (ih->ih_arg)
arg = ih->ih_arg;
else
arg = frame;
diff --git a/sys/arch/riscv64/dev/plic.c b/sys/arch/riscv64/dev/plic.c
index 7781ba08985..f058d66aae7 100644
--- a/sys/arch/riscv64/dev/plic.c
+++ b/sys/arch/riscv64/dev/plic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: plic.c,v 1.7 2021/05/19 17:39:49 kettenis Exp $ */
+/* $OpenBSD: plic.c,v 1.8 2022/01/03 03:06:50 jsg Exp $ */
/*
* Copyright (c) 2020, Mars Li <mengshi.li.mars@gmail.com>
@@ -381,7 +381,7 @@ plic_irq_dispatch(uint32_t irq, void *frame)
KERNEL_LOCK();
#endif
- if (ih->ih_arg != 0)
+ if (ih->ih_arg)
arg = ih->ih_arg;
else
arg = frame;