summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 15:08:00 +0100
committerHarald Welte <laforge@gnumonks.org>2016-12-09 15:36:58 +0000
commitc59e28fa5e2f0f5bbbf2b8a78a01abb739d8d3a3 (patch)
tree122a4d0a8f98381f8bbcd5a1badc09bee67bfcee
parent1cd50585e9c7c670c3df5e5bc729d97aaa612b39 (diff)
gsm0408_test.c: Don't pass negative value to strerror()
Change-Id: I4fcf24ec1bc974a3189486d2372b9713d7fdab70 Fixes: Coverity CID 135192
-rw-r--r--openbsc/tests/gsm0408/gsm0408_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c
index 9e7babb56..ae8cbdd0f 100644
--- a/openbsc/tests/gsm0408/gsm0408_test.c
+++ b/openbsc/tests/gsm0408/gsm0408_test.c
@@ -89,7 +89,7 @@ static inline void add_arfcn_b(struct osmo_earfcn_si2q *e, uint16_t earfcn,
{
int r = osmo_earfcn_add(e, earfcn, bw);
if (r)
- printf("failed to add EARFCN %u: %s\n", earfcn, strerror(r));
+ printf("failed to add EARFCN %u: %s\n", earfcn, strerror(-r));
else
printf("added EARFCN %u - ", earfcn);
}