dumpscan: Don't call cb_dirent twice 08/14308/4
authorThomas L. Kula <kula@tproa.net>
Thu, 14 May 2009 18:08:40 +0000 (14:08 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 4 Sep 2020 17:48:49 +0000 (13:48 -0400)
This fixes a bug where p->cb_dirent is called twice, if
it exists.

Change-Id: I7a7a6abf522b62eb310d003a61b3bbcdcda9e850
Reviewed-on: https://gerrit.openafs.org/14308
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/tools/dumpscan/directory.c

index 586f544..6aa043a 100644 (file)
@@ -127,9 +127,6 @@ afs_uint32 parse_directory(XFILE *X, dump_parser *p, afs_vnode *v,
       de.uniq  = ntohl(page.entry[i].vunique);
       if (p->print_flags & DSPRINT_DIR)
         printf("  %10d %10d  %s\n", de.vnode, de.uniq, de.name);
-      if (p->cb_dirent) {
-        r = (p->cb_dirent)(v, &de, X, p->refcon);
-      }
       if (p->cb_dirent && (r = (p->cb_dirent)(v, &de, X, p->refcon)))
         return r;
       i += ((l + 16) >> 5);