There is a typo while checking for error.
authorEuler Taveira <euler@timbira.com>
Thu, 30 Apr 2015 15:21:21 +0000 (12:21 -0300)
committerEuler Taveira <euler@timbira.com>
Tue, 5 May 2015 18:00:59 +0000 (15:00 -0300)
Spotted by Coverity.

src/pktbuf.c

index 23d2689e7e4a2e0782ae1c28f8340c9db7cbd3b3..0432a452500c51efa5f685efb765a44fa9207df7 100644 (file)
@@ -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));