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.
cute-signatures
Timo Teräs 2015-04-13 09:40:36 +03:00
parent 2322ba0ad9
commit 4395532932
1 changed files with 1 additions and 1 deletions

View File

@ -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,