From a493539a752f982e87708fa9b63eba9e324a80bf Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 3 Oct 2014 00:54:21 +1000 Subject: [PATCH] Only add strerro if errno != 0 --- src/connector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/connector.c b/src/connector.c index 4994f0a7..b282189f 100644 --- a/src/connector.c +++ b/src/connector.c @@ -204,8 +204,8 @@ retry: /* We should have something to read if called since poll set * this fd's revents status so if there's nothing it means the * client has disconnected. */ - LOGINFO("Client fd %d disconnected with ret %d errno %d: %s", client->fd, - ret, errno, strerror(errno)); + LOGINFO("Client fd %d disconnected with ret %d errno %d %s", client->fd, + ret, errno, errno ? strerror(errno) : ""); invalidate_client(ckp, ci, client); return; }