summaryrefslogtreecommitdiff
path: root/hald
diff options
context:
space:
mode:
authorAndrew Stormont <andyjstormont@googlemail.com>2011-06-13 22:27:38 +0100
committerAndrew Stormont <andyjstormont@googlemail.com>2011-06-13 22:27:38 +0100
commitb404105b6f44ed2180fae8c172b15fd1787b72a9 (patch)
tree8ffea7d15342a083503e4f1bca4463337714d1d5 /hald
parentecb86f4d5b6d0354d8fac639755464c6c3706e6d (diff)
downloadhal-master.tar.gz
Fix warnings when building on SolarisHEADmaster
Diffstat (limited to 'hald')
-rw-r--r--hald/create_cache.c5
-rw-r--r--hald/solaris/probing/printer.c2
-rw-r--r--hald/solaris/probing/probe-snmp.c2
-rw-r--r--hald/solaris/probing/probe-storage.c2
4 files changed, 7 insertions, 4 deletions
diff --git a/hald/create_cache.c b/hald/create_cache.c
index 246e9586..bc87d89a 100644
--- a/hald/create_cache.c
+++ b/hald/create_cache.c
@@ -8,6 +8,7 @@
* Copyright (C) 2006 Richard Hughes <richard@hughsie.com>
* Copyright (C) 2007 Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
* Copyright (C) 2007 Sergey Lapin <slapinid@gmail.com>
+ * Copyright (C) 2011 Andrew Stormont <andyjstormont@gmail.com>
*
* Licensed under the Academic Free License version 2.1
*
@@ -27,6 +28,9 @@
*
**************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
@@ -42,7 +46,6 @@
#include <syslog.h>
#include <expat.h>
#include <glib.h>
-#include <config.h>
#include "logger.h"
#include "rule.h"
diff --git a/hald/solaris/probing/printer.c b/hald/solaris/probing/printer.c
index da4425ab..a0b06e61 100644
--- a/hald/solaris/probing/printer.c
+++ b/hald/solaris/probing/printer.c
@@ -30,7 +30,7 @@ strip_ws(char *s)
char *p;
/* skip the leading whitespace */
- for (; ((*s != NULL) && (isspace(*s) != 0)); s++);
+ for (; ((*s != '\0') && (isspace(*s) != 0)); s++);
/* drop the trailing whitespace */
for (p = s + strlen(s) - 1; ((p > s) && (isspace(*p) != 0));
diff --git a/hald/solaris/probing/probe-snmp.c b/hald/solaris/probing/probe-snmp.c
index 6fb8bb72..0548aa24 100644
--- a/hald/solaris/probing/probe-snmp.c
+++ b/hald/solaris/probing/probe-snmp.c
@@ -40,7 +40,7 @@ hrDeviceDesc_to_info(char *string, char **manufacturer, char **model,
*description = strdup(string);
*manufacturer = strdup(string);
if ((s = strchr(*manufacturer, ' ')) != NULL) {
- *s++ = NULL;
+ *s++ = '\0';
*model = strdup(s);
}
}
diff --git a/hald/solaris/probing/probe-storage.c b/hald/solaris/probing/probe-storage.c
index d274aa93..123d7e46 100644
--- a/hald/solaris/probing/probe-storage.c
+++ b/hald/solaris/probing/probe-storage.c
@@ -268,7 +268,7 @@ check_floppy(int fd, dbus_bool_t *wprot)
int chg;
if ((ioctl(fd, FDGETCHANGE, &chg) == 0) && !(chg & FDGC_CURRENT)) {
- *wprot = ((chg & FDGC_CURWPROT) != NULL);
+ *wprot = ((chg & FDGC_CURWPROT) != 0);
return (TRUE);
} else {
return (FALSE);