summaryrefslogtreecommitdiffstats
path: root/src/file_hdf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-11-15 12:29:48 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2014-11-15 12:29:48 +0100
commit5ed8822f2b3cc95bf7f9bda45bf7b57e8a693f6d (patch)
tree69fd55db22dbc9b3d4d7ebc6aba46203a9c82b0e /src/file_hdf.c
parent17040353bc6dc9d3ac701037fe90ce69382fb49f (diff)
Turn off various signed/unsigned comparaison warnings
Diffstat (limited to 'src/file_hdf.c')
-rw-r--r--src/file_hdf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/file_hdf.c b/src/file_hdf.c
index a557667..fd02b68 100644
--- a/src/file_hdf.c
+++ b/src/file_hdf.c
@@ -74,6 +74,7 @@ static void file_check_hdf(file_recovery_t *file_recovery)
struct ddh_struct ddh;
const struct dd_struct *p;
unsigned int i;
+ unsigned int size;
if(
#ifdef HAVE_FSEEKO
fseeko(file_recovery->handle, offset, SEEK_SET) < 0 ||
@@ -93,7 +94,8 @@ static void file_check_hdf(file_recovery_t *file_recovery)
#ifdef DEBUG_HDF
log_info("size=%u next=%lu\n", be16(ddh.size), be32(ddh.next));
#endif
- for(i=0, p=dd; i < be16(ddh.size); i++,p++)
+ size=be16(ddh.size);
+ for(i=0, p=dd; i < size; i++,p++)
{
#ifdef DEBUG_HDF
log_info("tag=0x%04x, ref=%u, offset=%lu, length=%lu\n",