summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem.jover@nokia.com>2009-02-21 11:38:50 +0100
committerDanny Kukawka <danny.kukawka@web.de>2009-02-21 11:38:50 +0100
commitaa50b81fe08101679ed4e905f5f8b490643b2661 (patch)
tree9366720330be9b553093713cd73ec181651ef9d2
parent879f06a4e4abc87471a030a5f285dc32455082e4 (diff)
do not compare arrays against NULL
Do not compare arrays against NULL.
-rw-r--r--hald/linux/osspec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index f75d88a9..0b45f820 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -218,11 +218,11 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
HAL_INFO (("missing ACTION"));
goto invalid;
}
- if (hotplug_event->sysfs.sysfs_path == NULL) {
+ if (hotplug_event->sysfs.sysfs_path[0] == '\0') {
HAL_INFO (("missing DEVPATH"));
goto invalid;
}
- if (hotplug_event->sysfs.subsystem == NULL) {
+ if (hotplug_event->sysfs.subsystem[0] == '\0') {
HAL_INFO (("missing SUSBSYSTEM"));
goto invalid;
}
@@ -236,7 +236,7 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
HAL_INFO (("Temporary workaround: ignoring temporary cryptsetup file"));
goto invalid;
}
- if (hotplug_event->sysfs.device_file && (strstr (hotplug_event->sysfs.device_file, "/dm-") != NULL)) {
+ if (strstr (hotplug_event->sysfs.device_file, "/dm-") != NULL) {
HAL_DEBUG (("Found a dm-device (%s), mark it", hotplug_event->sysfs.device_file));
hotplug_event->sysfs.is_dm_device = TRUE;
}