summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-04-13 09:40:36 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-04-13 09:42:27 +0300
commit43955329325c823579ded743efb324cc8ea1daba (patch)
tree4045296c7f684325860d83e4d9b91419e495d604 /src
parent2322ba0ad938c142d0bb7a715940fc75ccdbe91b (diff)
downloadapk-tools-43955329325c823579ded743efb324cc8ea1daba.tar.gz
apk-tools-43955329325c823579ded743efb324cc8ea1daba.tar.bz2
apk-tools-43955329325c823579ded743efb324cc8ea1daba.tar.xz
apk-tools-43955329325c823579ded743efb324cc8ea1daba.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/url.c2
1 files changed, 1 insertions, 1 deletions
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,