X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fd.c;h=ea16bdda993aff814fa41684af53506e46242a4f;hp=54eddb3c46445ff625dfc1becb6bf7c5bfa75311;hb=4990334538fe7f18964a6027b22d47c7640c3ec0;hpb=795bf04f176cf48aa8636e3b904e8bc262df89f7 diff --git a/fd.c b/fd.c index 54eddb3c..ea16bdda 100644 --- a/fd.c +++ b/fd.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2010 Andre Noll + * Copyright (C) 2006-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -446,7 +446,7 @@ int para_chdir(const char *path) * \sa getcwd(3). * */ -int para_opendir(const char *dirname, DIR **dir, int *cwd) +static int para_opendir(const char *dirname, DIR **dir, int *cwd) { int ret; @@ -480,7 +480,7 @@ close_cwd: * * \return Standard. */ -int para_fchdir(int fd) +static int para_fchdir(int fd) { if (fchdir(fd) < 0) return -ERRNO_TO_PARA_ERROR(errno); @@ -563,6 +563,9 @@ out: int para_munmap(void *start, size_t length) { int err; + + if (!start) + return 0; if (munmap(start, length) >= 0) return 1; err = errno;