Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sysmon Explicitly compare to NULL to show clang that...
details: https://anonhg.NetBSD.org/src/rev/5e0974a5e38c
branches: trunk
changeset: 333913:5e0974a5e38c
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Nov 21 23:28:57 2014 +0000
description:
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:
sys/dev/sysmon/sysmon_power.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 5328fcd05dea -r 5e0974a5e38c sys/dev/sysmon/sysmon_power.c
--- a/sys/dev/sysmon/sysmon_power.c Fri Nov 21 22:31:09 2014 +0000
+++ b/sys/dev/sysmon/sysmon_power.c Fri Nov 21 23:28:57 2014 +0000
@@ -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 @@
#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)); \
Home |
Main Index |
Thread Index |
Old Index