X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fd.c;h=f70dedc1ec57fd7f2779b5818bb02e7746dfa263;hp=133f5d3baef49a0d600c4fd0f03ac2b20692631b;hb=97447a5e02cfccf0ccb3625f3d4d75c8b734dd6f;hpb=2d2ef9c2bf6e195d6e853b5234e79555974c242b diff --git a/fd.c b/fd.c index 133f5d3b..f70dedc1 100644 --- a/fd.c +++ b/fd.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2012 Andre Noll + * Copyright (C) 2006-2013 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)