X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=dump%2Fmain.c;h=a9a671d0d5b8fe2006cfc51bb83c6a573c64084e;hp=1bb5ca3abc3c2512ba76b1cf169173aed7842fd9;hb=e0267986934b9cf6f6c130a7779c999dff096804;hpb=d1925e0c515fcb4f815d75292566d600fd715ff5 diff --git a/dump/main.c b/dump/main.c index 1bb5ca3..a9a671d 100644 --- a/dump/main.c +++ b/dump/main.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.87 2003/10/26 16:05:47 stelian Exp $"; + "$Id: main.c,v 1.89 2004/01/04 10:48:35 stelian Exp $"; #endif /* not lint */ #include @@ -192,8 +192,8 @@ static void do_exclude_from_file __P((char *)); static void do_exclude_ino_str __P((char *)); static void incompat_flags __P((int, char, char)); -static char* iexclude_bitmap = NULL; /* the inode exclude bitmap */ -static int iexclude_bitmap_bytes = 0; /* size of bitmap in bytes */ +static char* iexclude_bitmap = NULL; /* the inode exclude bitmap */ +static unsigned int iexclude_bitmap_bytes = 0; /* size of bitmap in bytes */ int main(int argc, char *argv[]) @@ -1276,18 +1276,18 @@ do_exclude_ino(dump_ino_t ino, const char *reason) /* check for enough mem; initialize */ if ((ino/8 + 1) > iexclude_bitmap_bytes) { if (iexclude_bitmap_bytes == 0) { + unsigned int j; iexclude_bitmap_bytes = 2 * (ino/8 + 1); iexclude_bitmap = (char*) malloc(iexclude_bitmap_bytes); if (iexclude_bitmap == NULL) { msg("allocating memory failed\n"); exit(X_STARTUP); } - int j; for (j = 0; j < iexclude_bitmap_bytes; j++) iexclude_bitmap[j] = 0; } else { - int oldsize = iexclude_bitmap_bytes; + unsigned int oldsize = iexclude_bitmap_bytes; iexclude_bitmap_bytes *= (ino / 8 + 1) / iexclude_bitmap_bytes + 1; iexclude_bitmap = (char*) realloc(iexclude_bitmap,