diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-06-30 01:31:54 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2007-06-30 01:31:54 +0000 |
commit | 1f101bcb3952ce79440d0236313f3ed11cba2aaa (patch) | |
tree | 43d42b9665f52396b847c169ff4c312a8ecf9a15 /hardinfo2/arch/linux/common/storage.h | |
parent | 2d366bc8caf8083b66deaa09435f2dc93ffc9a69 (diff) |
Cleanups, fix crashes.
Diffstat (limited to 'hardinfo2/arch/linux/common/storage.h')
-rw-r--r-- | hardinfo2/arch/linux/common/storage.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/hardinfo2/arch/linux/common/storage.h b/hardinfo2/arch/linux/common/storage.h index 836ba7ea..03081e2f 100644 --- a/hardinfo2/arch/linux/common/storage.h +++ b/hardinfo2/arch/linux/common/storage.h @@ -21,10 +21,7 @@ static gchar *storage_icons = ""; static gboolean remove_scsi_devices(gpointer key, gpointer value, gpointer data) { - if (!strncmp((gchar *) key, "SCSI", 4)) { - return TRUE; - } - return FALSE; + return g_str_has_prefix(key, "SCSI"); } /* SCSI support by Pascal F.Martin <pascalmartin@earthlink.net> */ @@ -147,10 +144,7 @@ __scan_scsi_devices(void) static gboolean remove_ide_devices(gpointer key, gpointer value, gpointer data) { - if (!strncmp((gchar *) key, "IDE", 3)) { - return TRUE; - } - return FALSE; + return g_str_has_prefix(key, "IDE"); } void |