]> granicus.if.org Git - libevent/commitdiff
Avoid possible needless call to writev. Found by coverity.
authorNick Mathewson <nickm@torproject.org>
Thu, 26 Jul 2012 14:34:06 +0000 (10:34 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 26 Jul 2012 14:34:06 +0000 (10:34 -0400)
buffer.c

index ff64aede05e464bca7184c3731ac9260cfdd29fd..5fecb25b9a60e314c66f35bd648b0621ba1d9fbf 100644 (file)
--- a/buffer.c
+++ b/buffer.c
@@ -2263,6 +2263,8 @@ evbuffer_write_iovec(struct evbuffer *buffer, evutil_socket_t fd,
                }
                chain = chain->next;
        }
+       if (! i)
+               return 0;
 #ifdef WIN32
        {
                DWORD bytesSent;