diff options
Diffstat (limited to 'Src/Modules/files.c')
-rw-r--r-- | Src/Modules/files.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Src/Modules/files.c b/Src/Modules/files.c index 0b991c556..3fbccf576 100644 --- a/Src/Modules/files.c +++ b/Src/Modules/files.c @@ -382,9 +382,7 @@ recursivecmd(char *nam, int opt_noerr, int opt_recurse, int opt_safe, reccmd.dirpost_func = dirpost_func; reccmd.leaf_func = leaf_func; reccmd.magic = magic; - ds.ino = ds.dev = 0; - ds.dirname = NULL; - ds.dirfd = ds.level = -1; + init_dirsav(&ds); if (opt_recurse || opt_safe) { if ((ds.dirfd = open(".", O_RDONLY|O_NOCTTY)) < 0 && zgetdir(&ds) && *ds.dirname != '/') @@ -476,9 +474,7 @@ recursivecmd_dorec(struct recursivecmd const *reccmd, } err = err1; - dsav.ino = dsav.dev = 0; - dsav.dirname = NULL; - dsav.dirfd = dsav.level = -1; + init_dirsav(&dsav); d = opendir("."); if(!d) { if(!reccmd->opt_noerr) |