[Xfce4-commits] [panel-plugins/xfce4-battery-plugin] 01/01: Avoid unnecessary strdup (Bug #15196)

noreply at xfce.org noreply at xfce.org
Sat Mar 16 03:50:09 CET 2019


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

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-battery-plugin.

commit 695d02fd13a5394b81d02262dd1edb887034a0d6
Author: Andre Miranda <andreldm at xfce.org>
Date:   Fri Mar 15 23:49:36 2019 -0300

    Avoid unnecessary strdup (Bug #15196)
---
 panel-plugin/battery.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index ac9e8fb..a0c33f7 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -296,8 +296,7 @@ update_apm_status(t_battmon *battmon)
         }
 
         if (acline && new_state != BM_MISSING) {
-            gchar *tmp = g_strdup(icon_name);
-            g_free(icon_name);
+            gchar *tmp = icon_name;
             new_state++;
             icon_name = g_strconcat(tmp, "-charging", NULL);
             g_free(tmp);

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


More information about the Xfce4-commits mailing list