X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fd.c;h=456476e59ca3d1757a9828f8dec055cfc34aefd4;hp=133f5d3baef49a0d600c4fd0f03ac2b20692631b;hb=66cfa4ab3cd509b1b7d1b5fb860fc4644a2313ab;hpb=2d2ef9c2bf6e195d6e853b5234e79555974c242b diff --git a/fd.c b/fd.c index 133f5d3b..456476e5 100644 --- a/fd.c +++ b/fd.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2012 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" @@ -168,7 +166,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 @@ -526,6 +524,7 @@ static int para_opendir(const char *dirname, DIR **dir, int *cwd) { int ret; + *dir = NULL; if (cwd) { ret = para_open(".", O_RDONLY, 0); if (ret < 0)