summaryrefslogtreecommitdiff
path: root/libc/io
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-01-15 00:45:23 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-01-15 00:45:23 +0000
commit4fa8118022b19670c3f2a6f3dbc4d7b6b7df063c (patch)
treedd5d3b906d86c19a009739f46c6d5bbfd05e87b7 /libc/io
parent165be16219a0f9ad296f68fd805252e18c05e971 (diff)
downloadeglibc2-4fa8118022b19670c3f2a6f3dbc4d7b6b7df063c.tar.gz
Merge changes between r1147 and r1192 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@1193 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/io')
-rw-r--r--libc/io/fts.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libc/io/fts.c b/libc/io/fts.c
index 532743fb3..8e628b481 100644
--- a/libc/io/fts.c
+++ b/libc/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;
}
/*