X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=restore%2Frestore.c;h=c87b532d39cfc9046650febb5195e17400a2b4ef;hb=9ce5361de22147d955c6603d8915c68cb1009256;hp=5fcff708c0d9a205d3483718cd515b3e72b23aac;hpb=a55ce9149e3f4a5f848a20b7593dbe8cd7b0bbd1;p=dump.git diff --git a/restore/restore.c b/restore/restore.c index 5fcff70..c87b532 100644 --- a/restore/restore.c +++ b/restore/restore.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: restore.c,v 1.35 2004/12/15 11:00:01 stelian Exp $"; + "$Id: restore.c,v 1.38 2008/04/17 15:22:56 stelian Exp $"; #endif /* not lint */ #include @@ -581,7 +581,7 @@ findunreflinks(void) continue; if (ep->e_entries == NULL) continue; - for (j = 0; j < DIRHASH_SIZE; j++) { + for (j = 0; j < dirhash_size; j++) { for (np = ep->e_entries[j]; np != NULL; np = np->e_sibling) { if (np->e_flags == 0) { Dprintf(stdout, @@ -599,7 +599,7 @@ findunreflinks(void) for (ep = removelist; ep != NULL; ep = ep->e_next) { if (ep->e_entries == NULL) continue; - for (j = 0; j < DIRHASH_SIZE; j++) { + for (j = 0; j < dirhash_size; j++) { for (np = ep->e_entries[j]; np != NULL; np = np->e_sibling) { if (np->e_type == LEAF) { if (np->e_flags != 0) @@ -635,15 +635,19 @@ removeoldnodes(void) change = 0; prev = &removelist; for (ep = removelist; ep != NULL; ep = *prev) { + int docont = 0; if (ep->e_entries != NULL) { int i; - for (i = 0; i < DIRHASH_SIZE; i++) { + for (i = 0; i < dirhash_size; i++) { if (ep->e_entries[i] != NULL) { prev = &ep->e_next; - continue; + docont = 1; + break; } } } + if (docont) + continue; *prev = ep->e_next; removenode(ep); freeentry(ep); @@ -712,7 +716,6 @@ compareleaves(void) if (first != curfile.ino) { fprintf(stderr, "expected next file %ld, got %lu\n", (long)first, (unsigned long)curfile.ino); - do_compare_error; skipfile(); goto next; }