[gnome-flashback] system-indicators: simplify code



commit beee127b46b3ff430f7d3ea2d1af187c1b5952cd
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Mar 12 17:30:10 2020 +0200

    system-indicators: simplify code

 system-indicators/si-power.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/system-indicators/si-power.c b/system-indicators/si-power.c
index e223e10..55af4c2 100644
--- a/system-indicators/si-power.c
+++ b/system-indicators/si-power.c
@@ -191,7 +191,8 @@ get_themed_icon (SiPower  *self,
           icon_name = g_strdup (device_icon_name);
           tmp = g_strrstr (icon_name, "-symbolic");
 
-          g_strlcpy (tmp, "", sizeof (tmp));
+          if (tmp != NULL)
+            *tmp = '\0';
 
           icon = g_themed_icon_new (icon_name);
           g_free (icon_name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]