about summary refs log tree commit diff
path: root/src/locale
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-07-03 19:26:12 -0400
committerRich Felker <dalias@aerifal.cx>2011-07-03 19:26:12 -0400
commit2f0c415cebfedff0e4eb49b743a591a4c15d454e (patch)
treeb6cb5d1e01b32308e47f1aab476f20b9cb6fef04 /src/locale
parent58483f0afdc440edf992ff75cb3209a44f624776 (diff)
downloadmusl-2f0c415cebfedff0e4eb49b743a591a4c15d454e.tar.gz
musl-2f0c415cebfedff0e4eb49b743a591a4c15d454e.tar.xz
musl-2f0c415cebfedff0e4eb49b743a591a4c15d454e.zip
iconv was not returning -1 on most failure
this broke most uses of iconv in real-world programs, especially
glib's iconv wrappers.
Diffstat (limited to 'src/locale')
-rw-r--r--src/locale/iconv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
index e1b00de3..4ef1477f 100644
--- a/src/locale/iconv.c
+++ b/src/locale/iconv.c
@@ -559,9 +559,11 @@ ilseq:
 	goto end;
 toobig:
 	err = E2BIG;
+	x = -1;
 	goto end;
 starved:
 	err = EINVAL;
+	x = -1;
 end:
 	errno = err;
 	return x;