From: kettenis Date: Sun, 2 Jan 2022 20:00:21 +0000 (+0000) Subject: Don't use != 0 to check whether a pointer is non-NULL. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f9b35d7e8db0ed61986e4d16b1a4b9b373358bb2;p=openbsd Don't use != 0 to check whether a pointer is non-NULL. --- diff --git a/sys/arch/arm64/dev/agintc.c b/sys/arch/arm64/dev/agintc.c index 9c96c4636e9..d62dd41ee13 100644 --- a/sys/arch/arm64/dev/agintc.c +++ b/sys/arch/arm64/dev/agintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agintc.c,v 1.35 2021/10/24 17:52:28 mpi Exp $ */ +/* $OpenBSD: agintc.c,v 1.36 2022/01/02 20:00:21 kettenis Exp $ */ /* * Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn * Copyright (c) 2018 Mark Kettenis @@ -935,7 +935,7 @@ agintc_run_handler(struct intrhand *ih, void *frame, int s) KERNEL_LOCK(); #endif - if (ih->ih_arg != 0) + if (ih->ih_arg) arg = ih->ih_arg; else arg = frame; diff --git a/sys/arch/arm64/dev/ampintc.c b/sys/arch/arm64/dev/ampintc.c index 03a794902a9..3983aa5ed08 100644 --- a/sys/arch/arm64/dev/ampintc.c +++ b/sys/arch/arm64/dev/ampintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ampintc.c,v 1.26 2021/10/24 17:52:28 mpi Exp $ */ +/* $OpenBSD: ampintc.c,v 1.27 2022/01/02 20:00:21 kettenis Exp $ */ /* * Copyright (c) 2007,2009,2011 Dale Rahn * @@ -658,7 +658,7 @@ ampintc_run_handler(struct intrhand *ih, void *frame, int s) KERNEL_LOCK(); #endif - if (ih->ih_arg != 0) + if (ih->ih_arg) arg = ih->ih_arg; else arg = frame; diff --git a/sys/arch/arm64/dev/bcm2836_intr.c b/sys/arch/arm64/dev/bcm2836_intr.c index 6196b55cd9c..8467420c565 100644 --- a/sys/arch/arm64/dev/bcm2836_intr.c +++ b/sys/arch/arm64/dev/bcm2836_intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcm2836_intr.c,v 1.13 2021/10/24 17:52:28 mpi Exp $ */ +/* $OpenBSD: bcm2836_intr.c,v 1.14 2022/01/02 20:00:21 kettenis Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * Copyright (c) 2015 Patrick Wildt @@ -459,7 +459,7 @@ bcm_intc_run_handler(struct intrhand *ih, void *frame, int s) KERNEL_LOCK(); #endif - if (ih->ih_arg != 0) + if (ih->ih_arg) arg = ih->ih_arg; else arg = frame;