aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2008-06-30 23:55:25 -0300
committerLeandro A. F. Pereira <leandro@hardinfo.org>2008-06-30 23:55:25 -0300
commit6789f8b6268352e89ae83ccb4449901568b8849c (patch)
tree95c3c32039887567bf0ff49127d005ae7b5f272a /hardinfo2
parent8120a6822837b55602107c73594e346e4a6ab81f (diff)
Cleanups
Diffstat (limited to 'hardinfo2')
-rw-r--r--hardinfo2/arch/linux/common/resources.h15
-rw-r--r--hardinfo2/util.c1
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);