[PATCH synaptics] eventcomm: print strerror(errno), not of rc

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 20 23:53:37 PDT 2011


Found by coverity.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/eventcomm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/eventcomm.c b/src/eventcomm.c
index e0a6965..cd08f13 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -227,7 +227,7 @@ event_get_abs(InputInfoPtr pInfo, int fd, int code,
     SYSCALL(rc = ioctl(fd, EVIOCGABS(code), &abs));
     if (rc < 0) {
 	xf86IDrvMsg(pInfo, X_ERROR, "%s EVIOCGABS error on %d (%s)\n",
-		    __func__, code, strerror(rc));
+		    __func__, code, strerror(errno));
 	return errno;
     }
 
-- 
1.7.6.4

Cheers,
  Peter


More information about the xorg-devel mailing list