[libcroco] Fix unused status variable in cr_utils_utf8_to_ucs1()



commit 6bb010a2d6ca81f2c86b2e6990c44a844819b8f8
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Sat Oct 31 22:44:07 2015 +0000

    Fix unused status variable in cr_utils_utf8_to_ucs1()
    
    * Don't set status to CR_OK, it's initialized to that value
    * Return status
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710076

 src/cr-utils.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/cr-utils.c b/src/cr-utils.c
index dfb216b..2420cec 100644
--- a/src/cr-utils.c
+++ b/src/cr-utils.c
@@ -1011,7 +1011,6 @@ cr_utils_utf8_to_ucs1 (const guchar * a_in,
                               && a_out && a_out_len, CR_BAD_PARAM_ERROR);
 
         if (*a_in_len < 1) {
-                status = CR_OK;
                 goto end;
         }
 
@@ -1090,7 +1089,6 @@ cr_utils_utf8_to_ucs1 (const guchar * a_in,
                  *(if any) to get the current character.
                  */
                 if (in_index + nb_bytes_2_decode - 1 >= in_len) {
-                        status = CR_OK;
                         goto end;
                 }
 
@@ -1124,7 +1122,7 @@ cr_utils_utf8_to_ucs1 (const guchar * a_in,
         *a_out_len = out_index;
         *a_in_len = in_index;
 
-        return CR_OK;
+        return status;
 }
 
 /**


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