X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fd.c;h=ceff71f584545bb6356d38129c436e8d393fe38c;hp=4d4a859b08cf0e13dddea8aa724f94099a0518b1;hb=f167629b3191c57a6b691cd2a6af04a45a74ccb0;hpb=1e97f6746b605e37826fb6ee2ad35b7b330145d6 diff --git a/fd.c b/fd.c index 4d4a859b..ceff71f5 100644 --- a/fd.c +++ b/fd.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2013 Andre Noll + * Copyright (C) 2006 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -10,8 +10,6 @@ #include #include #include -#include -#include #include "para.h" #include "error.h" @@ -146,6 +144,7 @@ __printf_2_3 int write_va_buffer(int fd, const char *fmt, ...) va_start(ap, fmt); ret = xvasprintf(&msg, fmt, ap); + va_end(ap); ret = write_all(fd, msg, ret); free(msg); return ret; @@ -168,7 +167,7 @@ __printf_2_3 int write_va_buffer(int fd, const char *fmt, ...) * * \return Zero or a negative error code. If the underlying call to readv(2) * returned zero (indicating an end of file condition) or failed for some - * reason other than \p EAGAIN, a negative return value is returned. + * reason other than \p EAGAIN, a negative error code is returned. * * In any case, \a num_bytes contains the number of bytes that have been * successfully read from \a fd (zero if the first readv() call failed with