From b58f76ef372ff96464c9636f74384df68dae97cc Mon Sep 17 00:00:00 2001 From: gabor Date: Mon, 19 Sep 2011 22:49:36 +0000 Subject: - Fix a trivial bug in iconv. When there is no space to perform the conversion, conversion must fail and errno must be set to E2BIG. PR: standards/160673 Submitted by: Henning Petersen Reviewed by: pluknet Approved by: re (kib), delphij (mentor) --- lib/libc/iconv/citrus_none.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/iconv/citrus_none.c b/lib/libc/iconv/citrus_none.c index 1f77ad0..9ec4bd3 100644 --- a/lib/libc/iconv/citrus_none.c +++ b/lib/libc/iconv/citrus_none.c @@ -190,7 +190,6 @@ _citrus_NONE_stdenc_wctomb(struct _citrus_stdenc * __restrict ce __unused, void * __restrict pspriv __unused, size_t * __restrict nresult, struct iconv_hooks *hooks __unused) { - int ret; if ((wc & ~0xFFU) != 0) { *nresult = (size_t)-1; @@ -198,7 +197,7 @@ _citrus_NONE_stdenc_wctomb(struct _citrus_stdenc * __restrict ce __unused, } if (n == 0) { *nresult = (size_t)-1; - ret = E2BIG; + return (E2BIG); } *nresult = 1; -- cgit v1.1