[libcroco] Fix unused status variable in cr_utils_ucs1_to_utf8()
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libcroco] Fix unused status variable in cr_utils_ucs1_to_utf8()
- Date: Sun, 1 Nov 2015 10:18:39 +0000 (UTC)
commit ac8029a5fe0bf9df81ea6965ac056aa81fa4885d
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Sat Oct 31 22:42:18 2015 +0000
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
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;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]