[tracker] libtracker-common: Fix code flow in tracker_unescape_unichars()



commit 639d9b614afb9cb5eb6f7cc8d52d98ba04ad43a9
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Feb 22 23:21:52 2019 +0100

    libtracker-common: Fix code flow in tracker_unescape_unichars()
    
    There was a second if() hidden in the block, meant to be a "else if".
    Also drop the continues, since there's not much code afterwards in
    the loop.

 src/libtracker-common/tracker-utils.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/libtracker-common/tracker-utils.c b/src/libtracker-common/tracker-utils.c
index c5a5721c7..f6fb89348 100644
--- a/src/libtracker-common/tracker-utils.c
+++ b/src/libtracker-common/tracker-utils.c
@@ -303,20 +303,18 @@ tracker_unescape_unichars (const gchar  *str,
                        g_string_append_c (copy, str[i]);
                        g_string_append_c (copy, str[i + 1]);
                        i += 2;
-               } if (len - i >= 6 &&
+               } else if (len - i >= 6 &&
                    strncmp (&str[i], "\\u", 2) == 0 &&
                    range_is_xdigit (&str[i], 2, 6)) {
                        ch = xdigit_to_unichar (&str[i], 2, 6);
                        g_string_append_unichar (copy, ch);
                        i += 6;
-                       continue;
                } else if (len - i >= 10 &&
                           strncmp (&str[i], "\\U", 2) == 0 &&
                           range_is_xdigit (&str[i], 2, 10)) {
                        ch = xdigit_to_unichar (&str[i], 2, 10);
                        g_string_append_unichar (copy, ch);
                        i += 10;
-                       continue;
                } else {
                        g_string_append_c (copy, str[i]);
                        i++;


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