From 2aaa16437227a0c5675e4c44feae3eef0ef32fd1 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 27 Jul 2007 16:35:15 +0000 Subject: =?UTF-8?q?2007-07-27=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * nfsclient/src/dirutils.c: Use PATH_MAX instead of MAXPATHLEN. --- c/src/nfsclient/src/dirutils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'c/src/nfsclient/src/dirutils.c') diff --git a/c/src/nfsclient/src/dirutils.c b/c/src/nfsclient/src/dirutils.c index e5ba2f349c..20ebd2dcf6 100644 --- a/c/src/nfsclient/src/dirutils.c +++ b/c/src/nfsclient/src/dirutils.c @@ -69,9 +69,9 @@ int pwd(void) { -char buf[MAXPATHLEN]; +char buf[PATH_MAX]; - if ( !getcwd(buf,MAXPATHLEN)) { + if ( !getcwd(buf,PATH_MAX)) { perror("getcwd"); return -1; } else { @@ -120,7 +120,7 @@ int ls(char *dir, char *opts) { struct dirent *de; -char path[MAXPATHLEN+1]; +char path[PATH_MAX+1]; char *chpt; DIR *dp = 0; int rval = -1; @@ -129,8 +129,8 @@ struct stat buf; if ( !dir ) dir = "."; - strncpy(path, dir, MAXPATHLEN); - path[MAXPATHLEN] = 0; + strncpy(path, dir, PATH_MAX); + path[PATH_MAX] = 0; chpt = path+strlen(path); if ( !(dp=opendir(dir)) ) { -- cgit v1.2.3