diff options
author | Jim Meyering <jim@meyering.net> | 2003-02-28 12:42:31 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-02-28 12:42:31 +0000 |
commit | 4433c9a08282168883feac2391c59430610a18e0 (patch) | |
tree | 6b319ee4d00260a990c41f909b490a6b16deb3f8 /lib | |
parent | 3a4ac3a6a6b8ddb81752056cfb5fa8ca31da812e (diff) | |
download | coreutils-4433c9a08282168883feac2391c59430610a18e0.tar.xz |
(fts_children): If opening `.' fails, set the fts_child
member to NULL before returning. From NetBSD.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fts.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -670,7 +670,7 @@ fts_children(sp, instr) return (sp->fts_child = fts_build(sp, instr)); if ((fd = open(".", O_RDONLY, 0)) < 0) - return (NULL); + return (sp->fts_child = NULL); sp->fts_child = fts_build(sp, instr); if (fchdir(fd)) { (void)close(fd); |