[PATCH] libosmo-abis[master]: don't pass negative error to strerror()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Nov 26 08:51:24 UTC 2016


Review at  https://gerrit.osmocom.org/1288

don't pass negative error to strerror()

Change-Id: I48c25c78148d1fe9ce4e4a88cdfe5cf74dc95b17
Fixes: Coverity CID 57858
---
M src/input/rs232.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/88/1288/1

diff --git a/src/input/rs232.c b/src/input/rs232.c
index 2fd2a09..9da01a3 100644
--- a/src/input/rs232.c
+++ b/src/input/rs232.c
@@ -270,7 +270,7 @@
 	if (rc < 0) {
 		close(bfd->fd);
 		LOGP(DLMI, LOGL_ERROR, "rs232: could not register FD: %s\n",
-			strerror(rc));
+			strerror(-rc));
 		return rc;
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/1288
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48c25c78148d1fe9ce4e4a88cdfe5cf74dc95b17
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list