From 0946e98582e990f95d886568f4c7ec36a9dbdd02 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Thu, 30 Apr 2015 12:21:21 -0300 Subject: [PATCH] There is a typo while checking for error. Spotted by Coverity. --- src/pktbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.39.5