summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 15:08:00 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-26 17:10:29 +0100
commite5f36899efc582a5de9e303313ffa924a727fe59 (patch)
tree81476f56079831f4413c181c36c1235802aa8e18
parentfaab54200d13bc1a0f1f1618650a21e53ffaaea7 (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 0c7b5cecb..3d9315207 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);
}