From: Sean Hefty Date: Wed, 23 Jul 2014 06:24:53 +0000 (-0700) Subject: udpong: Fix client_recv error check X-Git-Tag: v1.0.19-1~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=a7287adaea52d21cd2d50f1621f8eda37c4c3c90;p=~shefty%2Flibrdmacm.git udpong: Fix client_recv error check We only want to report an error if it's not EGAIN. The if statement is reversed. Correct it. Signed-off-by: Sean Hefty --- diff --git a/examples/udpong.c b/examples/udpong.c index af8deb9e..7ec11e85 100644 --- a/examples/udpong.c +++ b/examples/udpong.c @@ -347,7 +347,7 @@ static ssize_t client_recv(struct message *msg, size_t size, int timeout) } ret = rs_recv(rs, msg, size, flags | MSG_DONTWAIT); - if (ret < 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) + if (ret < 0 && errno != EWOULDBLOCK && errno != EAGAIN) perror("rrecv"); return ret;