From 43955329325c823579ded743efb324cc8ea1daba Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Mon, 13 Apr 2015 09:40:36 +0300 Subject: fix error mapping types on arm char is by default unsigned, so this caused crashes as the ERR_PTR mechanism did not work as expected with unsigned types. extend the array type to be signed short explicitly. --- src/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/url.c') diff --git a/src/url.c b/src/url.c index d62a7e7..2dc47c7 100644 --- a/src/url.c +++ b/src/url.c @@ -40,7 +40,7 @@ struct apk_fetch_istream { static int fetch_maperror(int ec) { - static const char map[] = { + static const signed short map[] = { [FETCH_ABORT] = -ECONNABORTED, [FETCH_AUTH] = -EACCES, [FETCH_DOWN] = -ECONNREFUSED, -- cgit v1.2.3-70-g09d2