diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2007-07-27 16:35:15 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2007-07-27 16:35:15 +0000 |
commit | 2aaa16437227a0c5675e4c44feae3eef0ef32fd1 (patch) | |
tree | 3138d2a81015581918190af8bef94cfaf3514a30 /c/src/nfsclient/src/dirutils.c | |
parent | Formatting. (diff) | |
download | rtems-2aaa16437227a0c5675e4c44feae3eef0ef32fd1.tar.bz2 |
2007-07-27 Ralf Corsépius <ralf.corsepius@rtems.org>
* nfsclient/src/dirutils.c: Use PATH_MAX instead of MAXPATHLEN.
Diffstat (limited to '')
-rw-r--r-- | c/src/nfsclient/src/dirutils.c | 10 |
1 files changed, 5 insertions, 5 deletions
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)) ) { |