diff options
-rw-r--r-- | hardinfo2/arch/linux/common/resources.h | 15 | ||||
-rw-r--r-- | hardinfo2/util.c | 1 |
2 files changed, 9 insertions, 7 deletions
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 diff --git a/hardinfo2/util.c b/hardinfo2/util.c index 2cf37291..d742233a 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -489,6 +489,7 @@ gchar *module_call_method(gchar * method) g_strdup_printf("{Unknown method: \"%s\"}", method); } +/* FIXME: varargs? */ gchar *module_call_method_param(gchar * method, gchar * parameter) { gchar *(*function) (gchar *param); |