summaryrefslogtreecommitdiffstats
path: root/src/file_hdf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-06-14 19:04:44 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-06-14 19:04:44 +0200
commit2d2292caede8d4bebb7968fb8fb181df55f07aaf (patch)
tree3209453ed22d607e4c6f2f3cffb1a789ce6272cc /src/file_hdf.c
parentd576a81e1f0481cef490974509273e54dd572372 (diff)
Fix for various cppcheck warnings
Diffstat (limited to 'src/file_hdf.c')
-rw-r--r--src/file_hdf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file_hdf.c b/src/file_hdf.c
index 0eec179..53b0260 100644
--- a/src/file_hdf.c
+++ b/src/file_hdf.c
@@ -83,12 +83,12 @@ static void file_check_hdf(file_recovery_t *file_recovery)
file_recovery->file_size=0;
return ;
}
- if(file_size < offset + sizeof(struct dd_struct) * be16(ddh.size))
- file_size = offset + sizeof(struct dd_struct) * be16(ddh.size);
+ size=be16(ddh.size);
+ if(file_size < offset + sizeof(struct dd_struct) * size)
+ file_size = offset + sizeof(struct dd_struct) * size;
#ifdef DEBUG_HDF
- log_info("size=%u next=%lu\n", be16(ddh.size), be32(ddh.next));
+ log_info("size=%u next=%lu\n", size, be32(ddh.next));
#endif
- size=be16(ddh.size);
for(i=0, p=dd; i < size; i++,p++)
{
#ifdef DEBUG_HDF