diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2015-10-31 22:42:18 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2015-11-01 10:13:27 +0000 |
commit | ac8029a5fe0bf9df81ea6965ac056aa81fa4885d (patch) | |
tree | c4e50bfc4294c965a39618013865211fb4714cdc | |
parent | bc9b2c339e1181f8c69a2f74a93876932e352d6d (diff) | |
download | libcroco-ac8029a5fe0bf9df81ea6965ac056aa81fa4885d.tar.gz |
Fix unused status variable in cr_utils_ucs1_to_utf8()
* Return status instead (initialized to CR_OK) instead of an explicit CR_OK
* Remove redundant check for *a_in_len < 1 (equivalent to *a_in_len == 0)
and remove now-unused end label
https://bugzilla.gnome.org/show_bug.cgi?id=710076
-rw-r--r-- | src/cr-utils.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cr-utils.c b/src/cr-utils.c index 0030084..dfb216b 100644 --- a/src/cr-utils.c +++ b/src/cr-utils.c @@ -898,15 +898,10 @@ cr_utils_ucs1_to_utf8 (const guchar * a_in, if (*a_in_len == 0) { *a_out_len = 0 ; - return CR_OK ; + return status; } g_return_val_if_fail (a_out, CR_BAD_PARAM_ERROR) ; - if (*a_in_len < 1) { - status = CR_OK; - goto end; - } - in_len = *a_in_len; out_len = *a_out_len; @@ -927,11 +922,10 @@ cr_utils_ucs1_to_utf8 (const guchar * a_in, } } /*end for */ - end: *a_in_len = in_index; *a_out_len = out_index; - return CR_OK; + return status; } /** |