summaryrefslogtreecommitdiff
path: root/io/fts.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-01-17 10:42:43 +0000
committerJakub Jelinek <jakub@redhat.com>2007-01-17 10:42:43 +0000
commitaf98d46f5a025ae33c60ddb1a5edc753fb714bc5 (patch)
tree24a3c5cb0bfc6163b52ae74ac205f0e175beee87 /io/fts.c
parent1f09da09fed864c91288ff91295114fa5202edaa (diff)
Updated to fedora-glibc-20070117T0857
Diffstat (limited to 'io/fts.c')
-rw-r--r--io/fts.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/io/fts.c b/io/fts.c
index 532743fb3e..8e628b481d 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -376,12 +376,14 @@ fts_read(sp)
}
p = sp->fts_child;
sp->fts_child = NULL;
+ sp->fts_cur = p;
goto name;
}
/* Move to the next node on this level. */
next: tmp = p;
if ((p = p->fts_link) != NULL) {
+ sp->fts_cur = p;
free(tmp);
/*
@@ -394,7 +396,7 @@ next: tmp = p;
return (NULL);
}
fts_load(sp, p);
- return (sp->fts_cur = p);
+ return p;
}
/*
@@ -420,11 +422,12 @@ next: tmp = p;
name: t = sp->fts_path + NAPPEND(p->fts_parent);
*t++ = '/';
memmove(t, p->fts_name, p->fts_namelen + 1);
- return (sp->fts_cur = p);
+ return p;
}
/* Move up to the parent node. */
p = tmp->fts_parent;
+ sp->fts_cur = p;
free(tmp);
if (p->fts_level == FTS_ROOTPARENTLEVEL) {
@@ -465,7 +468,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
return (NULL);
}
p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
- return (sp->fts_cur = p);
+ return p;
}
/*