From ebdc245554cead9e4c76751b01b8d7d1894b1fcd Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 21 Nov 2014 23:28:57 +0000 Subject: [PATCH] Explicitly compare to NULL to show clang that the bool conversion is intentional, even if it is always true in case of the arrays. --- sys/dev/sysmon/sysmon_power.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/sysmon/sysmon_power.c b/sys/dev/sysmon/sysmon_power.c index 6999969a6df9..33828dd14f7a 100644 --- a/sys/dev/sysmon/sysmon_power.c +++ b/sys/dev/sysmon/sysmon_power.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_power.c,v 1.47 2014/08/10 16:44:36 tls Exp $ */ +/* $NetBSD: sysmon_power.c,v 1.48 2014/11/21 23:28:57 joerg Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -69,7 +69,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.47 2014/08/10 16:44:36 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.48 2014/11/21 23:28:57 joerg Exp $"); #include "opt_compat_netbsd.h" #include @@ -653,7 +653,7 @@ sysmon_power_make_dictionary(prop_dictionary_t dict, void *power_data, #define SETPROP(key, str) \ do { \ - if ((str) && !prop_dictionary_set_cstring(dict, \ + if ((str) != NULL && !prop_dictionary_set_cstring(dict, \ (key), \ (str))) { \ printf("%s: failed to set %s\n", __func__, (str)); \