[Xfce4-commits] [panel-plugins/xfce4-sensors-plugin] 09/10: don't strdup the sensors->path in acpi; annotations for further optimization of excution time in middlelayer when getting a feature's value

noreply at xfce.org noreply at xfce.org
Sat Mar 18 18:26:49 CET 2017


This is an automated email from the git hooks/post-receive script.

timystery pushed a commit to branch master
in repository panel-plugins/xfce4-sensors-plugin.

commit 79eec44c1671ed0fb36f67851fbfb6f0be810a4e
Author: Fabian <timystery at arcor.de>
Date:   Sat Mar 18 01:36:00 2017 +0100

    don't strdup the sensors->path in acpi; annotations for further optimization of excution time in middlelayer when getting a feature's value
---
 lib/acpi.c        | 1 -
 lib/middlelayer.c | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/acpi.c b/lib/acpi.c
index e4a3e69..6650494 100644
--- a/lib/acpi.c
+++ b/lib/acpi.c
@@ -590,7 +590,6 @@ initialize_ACPI (GPtrArray *arr_ptr_chips)
     g_return_val_if_fail(ptr_chipname_tmp != NULL, -1);
 
     ptr_chipname_tmp->prefix = g_strdup(_("ACPI"));
-    ptr_chipname_tmp->path = g_strdup(_("ACPI"));
 
     ptr_chip->chip_name = (sensors_chip_name *) ptr_chipname_tmp;
 
diff --git a/lib/middlelayer.c b/lib/middlelayer.c
index c053f3a..f4f012d 100644
--- a/lib/middlelayer.c
+++ b/lib/middlelayer.c
@@ -228,6 +228,7 @@ sensor_get_value (t_chip *chip, int number, double *value, gboolean *suppressmes
                 g_assert (number<chip->num_features);
                 feature = (t_chipfeature *) g_ptr_array_index (chip->chip_features, number);
                 g_assert (feature!=NULL);
+                /* TODO: seperate refresh from get operation! */
                 refresh_acpi ((gpointer) feature, NULL);
                 *value = feature->raw_value;
                 return 0;
@@ -241,6 +242,7 @@ sensor_get_value (t_chip *chip, int number, double *value, gboolean *suppressmes
                 g_assert (number<chip->num_features);
                 feature = (t_chipfeature *) g_ptr_array_index (chip->chip_features, number);
                 g_assert (feature!=NULL);
+                /* TODO: seperate refresh from get operation! */
                 refresh_nvidia ((gpointer) feature, NULL);
                 *value = feature->raw_value;
                 return 0;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list