]> git.wh0rd.org - dump.git/blobdiff - restore/utilities.c
Fix code to not require ISO C99.
[dump.git] / restore / utilities.c
index 2e73aa87cac93cb2bfb3accdfa899b578335feb5..f17bd9ce458a7214ab50050f787c794d79a033a1 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: utilities.c,v 1.26 2004/12/15 11:00:01 stelian Exp $";
+       "$Id: utilities.c,v 1.28 2005/03/30 13:21:45 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -380,7 +380,7 @@ badentry(struct entry *ep, const char *msg)
                int i;
                for (i = 0; i < DIRHASH_SIZE; i++) {
                        if (ep->e_entries[i] != NULL) {
-                               fprintf(stderr, "next entry name: %s\n", myname(ep->e_entries[0]));
+                               fprintf(stderr, "next entry name: %s\n", myname(ep->e_entries[i]));
                                break;
                        }
                }
@@ -487,8 +487,10 @@ panic(fmt, va_alist)
        if (yflag)
                return;
        if (reply("abort") == GOOD) {
-               if (reply("dump core") == GOOD)
+               if (reply("dump core") == GOOD) {
+                       fchdir(wdfd);
                        abort();
+               }
                exit(1);
        }
 }