From 1f101bcb3952ce79440d0236313f3ed11cba2aaa Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sat, 30 Jun 2007 01:31:54 +0000 Subject: Cleanups, fix crashes. --- hardinfo2/arch/linux/common/storage.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'hardinfo2/arch/linux/common/storage.h') 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 */ @@ -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 -- cgit v1.2.3