summaryrefslogtreecommitdiff
path: root/sys/dev/sysmon
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2014-11-21 23:28:57 +0000
committerjoerg <joerg@NetBSD.org>2014-11-21 23:28:57 +0000
commit14a60741ebe1ab8e248cd73ebb0e137e2a9fa1ab (patch)
tree431688091ac9badf1cffe28734968461d3a1ce4b /sys/dev/sysmon
parentb89a6c8647a72a6216e0d0e9620bf5bea1b7ecda (diff)
Explicitly compare to NULL to show clang that the bool conversion is
intentional, even if it is always true in case of the arrays.
Diffstat (limited to 'sys/dev/sysmon')
-rw-r--r--sys/dev/sysmon/sysmon_power.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/sysmon/sysmon_power.c b/sys/dev/sysmon/sysmon_power.c
index 6999969a6df..33828dd14f7 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 <sys/cdefs.h>
-__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 <sys/param.h>
@@ -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)); \