[Xfce4-commits] [xfce/libxfce4util] 02/02: Avoid excessive type-casting

noreply at xfce.org noreply at xfce.org
Sun Jun 10 19:06:05 CEST 2018


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

s   k   u   n   n   y   k       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 xfce/libxfce4util.

commit db9c3b422df1190a6250e535450dafdc53877434
Author: Thomas Lange <thomas-lange2 at gmx.de>
Date:   Thu May 31 22:54:51 2018 +0200

    Avoid excessive type-casting
---
 libxfce4util/xfce-rc-simple.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/libxfce4util/xfce-rc-simple.c b/libxfce4util/xfce-rc-simple.c
index fbc4db3..c615d93 100644
--- a/libxfce4util/xfce-rc-simple.c
+++ b/libxfce4util/xfce-rc-simple.c
@@ -627,12 +627,14 @@ _xfce_rc_simple_parse (XfceRcSimple *simple)
   gchar   *locale;
   gchar   *value;
   gchar   *key;
+  XfceRc  *rc;
   FILE    *fp;
 
   _xfce_return_val_if_fail (simple != NULL, FALSE);
   _xfce_return_val_if_fail (simple->filename != NULL, FALSE);
 
-  readonly = xfce_rc_is_readonly (XFCE_RC (simple));
+  rc = XFCE_RC (simple);
+  readonly = xfce_rc_is_readonly (rc);
 
   fp = fopen (simple->filename, "r");
   if (fp == NULL)
@@ -655,14 +657,11 @@ _xfce_rc_simple_parse (XfceRcSimple *simple)
           continue;
         }
 
-      if (XFCE_RC (simple)->locale == NULL)
+      if (rc->locale == NULL)
         continue;
 
-      if (xfce_locale_match (XFCE_RC (simple)->locale, locale) > XFCE_LOCALE_NO_MATCH
-          || !readonly)
-        {
-          simple_add_entry (simple, key, value, locale);
-        }
+      if (!readonly || xfce_locale_match (rc->locale, locale) > XFCE_LOCALE_NO_MATCH)
+        simple_add_entry (simple, key, value, locale);
     }
 
   fclose (fp);

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


More information about the Xfce4-commits mailing list