X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fd.c;h=b8d0d77c3ba94091d753714d54b8181ce7c395ac;hp=133f5d3baef49a0d600c4fd0f03ac2b20692631b;hb=d1e6b28f66e243516d01916f9125baee75dd98d6;hpb=2d2ef9c2bf6e195d6e853b5234e79555974c242b diff --git a/fd.c b/fd.c index 133f5d3b..b8d0d77c 100644 --- a/fd.c +++ b/fd.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2012 Andre Noll + * Copyright (C) 2006-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -168,7 +168,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 +526,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)