From 6789f8b6268352e89ae83ccb4449901568b8849c Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Mon, 30 Jun 2008 23:55:25 -0300 Subject: Cleanups --- hardinfo2/arch/linux/common/resources.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'hardinfo2/arch/linux') diff --git a/hardinfo2/arch/linux/common/resources.h b/hardinfo2/arch/linux/common/resources.h index e669b0ec..6ce5688d 100644 --- a/hardinfo2/arch/linux/common/resources.h +++ b/hardinfo2/arch/linux/common/resources.h @@ -37,12 +37,14 @@ static gchar *_resource_obtain_name(gchar *name) if (g_regex_match(_regex_pci, name, 0, NULL)) { temp = module_call_method_param("devices::getPCIDeviceDescription", name); - return temp ? temp : g_strdup(name); - } - - if (g_regex_match(_regex_module, name, 0, NULL)) { + if (temp) { + return temp; + } + } else if (g_regex_match(_regex_module, name, 0, NULL)) { temp = module_call_method_param("computer::getKernelModuleDescription", name); - return temp ? temp : g_strdup(name); + if (temp) { + return temp; + } } return g_strdup(name); @@ -120,5 +122,4 @@ void scan_device_resources(gboolean reload) gchar *callback_device_resources(void) { return _resources; -} - +} \ No newline at end of file -- cgit v1.2.3