summaryrefslogtreecommitdiff
path: root/lib/uniconv
diff options
context:
space:
mode:
Diffstat (limited to 'lib/uniconv')
-rw-r--r--lib/uniconv/u-conv-to-enc.h10
-rw-r--r--lib/uniconv/u8-conv-to-enc.c10
2 files changed, 8 insertions, 12 deletions
diff --git a/lib/uniconv/u-conv-to-enc.h b/lib/uniconv/u-conv-to-enc.h
index f8840c2577..ed715482a2 100644
--- a/lib/uniconv/u-conv-to-enc.h
+++ b/lib/uniconv/u-conv-to-enc.h
@@ -25,7 +25,6 @@ FUNC (const char *tocode,
size_t *scaled_offsets;
char *result;
size_t length;
- int retval;
if (offsets != NULL && srclen > 0)
{
@@ -42,11 +41,10 @@ FUNC (const char *tocode,
result = resultbuf;
length = *lengthp;
- retval = mem_iconveha ((const char *) src, srclen * sizeof (UNIT),
- UTF_NAME, tocode,
- handler == iconveh_question_mark, handler,
- scaled_offsets, &result, &length);
- if (retval < 0)
+ if (mem_iconveha ((const char *) src, srclen * sizeof (UNIT),
+ UTF_NAME, tocode,
+ handler == iconveh_question_mark, handler,
+ scaled_offsets, &result, &length) < 0)
{
int saved_errno = errno;
free (scaled_offsets);
diff --git a/lib/uniconv/u8-conv-to-enc.c b/lib/uniconv/u8-conv-to-enc.c
index 5aec163a11..90acccec1c 100644
--- a/lib/uniconv/u8-conv-to-enc.c
+++ b/lib/uniconv/u8-conv-to-enc.c
@@ -70,13 +70,11 @@ u8_conv_to_encoding (const char *tocode,
{
char *result = resultbuf;
size_t length = *lengthp;
- int retval =
- mem_iconveha ((const char *) src, srclen,
- "UTF-8", tocode,
- handler == iconveh_question_mark, handler,
- offsets, &result, &length);
- if (retval < 0)
+ if (mem_iconveha ((const char *) src, srclen,
+ "UTF-8", tocode,
+ handler == iconveh_question_mark, handler,
+ offsets, &result, &length) < 0)
return NULL;
if (result == NULL) /* when (resultbuf == NULL && length == 0) */