diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-12-21 09:35:28 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-12-21 09:35:28 +0000 |
commit | baa0a2c9a410a88fcacdf82abc7d21b0c99c7cd3 (patch) | |
tree | 23761bbdd386ee804a16e3483d30adb8bc204c3a /io | |
parent | 2bf037b4e8e189e910a41744d79404b94235ab8b (diff) | |
download | glibc-baa0a2c9a410a88fcacdf82abc7d21b0c99c7cd3.tar.gz glibc-baa0a2c9a410a88fcacdf82abc7d21b0c99c7cd3.tar.xz glibc-baa0a2c9a410a88fcacdf82abc7d21b0c99c7cd3.zip |
Updated to fedora-glibc-20051221T0931
Diffstat (limited to 'io')
-rw-r--r-- | io/fts.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/io/fts.c b/io/fts.c index f0df56cc7b..2b99206b88 100644 --- a/io/fts.c +++ b/io/fts.c @@ -53,7 +53,7 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #endif -static FTSENT *fts_alloc (FTS *, const char *, int) internal_function; +static FTSENT *fts_alloc (FTS *, const char *, size_t) internal_function; static FTSENT *fts_build (FTS *, int) internal_function; static void fts_lfree (FTSENT *) internal_function; static void fts_load (FTS *, FTSENT *) internal_function; @@ -94,7 +94,6 @@ fts_open(argv, options, compar) register FTSENT *p, *root; register int nitems; FTSENT *parent, *tmp; - int len; /* Options check. */ if (options & ~FTS_OPTIONMASK) { @@ -120,7 +119,8 @@ fts_open(argv, options, compar) #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif - if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN))) + size_t maxarglen = fts_maxarglen(argv); + if (fts_palloc(sp, MAX(maxarglen, MAXPATHLEN))) goto mem1; /* Allocate/initialize root's parent. */ @@ -131,7 +131,8 @@ fts_open(argv, options, compar) /* Allocate/initialize root(s). */ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { /* Don't allow zero-length paths. */ - if ((len = strlen(*argv)) == 0) { + size_t len = strlen(*argv); + if (len == 0) { __set_errno (ENOENT); goto mem3; } @@ -690,7 +691,7 @@ fts_build(sp, type) if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) continue; - if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL) + if ((p = fts_alloc(sp, dp->d_name, _D_EXACT_NAMLEN (dp))) == NULL) goto mem1; if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */ oldaddr = sp->fts_path; @@ -961,7 +962,7 @@ internal_function fts_alloc(sp, name, namelen) FTS *sp; const char *name; - register int namelen; + size_t namelen; { register FTSENT *p; size_t len; |