X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fd.c;h=ea16bdda993aff814fa41684af53506e46242a4f;hp=54eddb3c46445ff625dfc1becb6bf7c5bfa75311;hb=eb9722e8763a9b2a2ae99d98a9715bd932081c3c;hpb=877c179023ba45d481e9d89ac82fb0856617587b 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;