From: Euler Taveira Date: Thu, 30 Apr 2015 15:21:21 +0000 (-0300) Subject: There is a typo while checking for error. X-Git-Tag: pgbouncer_1_6~7^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0946e98582e990f95d886568f4c7ec36a9dbdd02;p=pgbouncer There is a typo while checking for error. Spotted by Coverity. --- diff --git a/src/pktbuf.c b/src/pktbuf.c index 23d2689..0432a45 100644 --- a/src/pktbuf.c +++ b/src/pktbuf.c @@ -114,7 +114,7 @@ static void pktbuf_send_func(int fd, short flags, void *arg) amount = buf->write_pos - buf->send_pos; res = safe_send(fd, buf->buf + buf->send_pos, amount, 0); if (res < 0) { - if (res == EAGAIN) { + if (errno == EAGAIN) { res = 0; } else { log_error("pktbuf_send_func: %s", strerror(errno));