summaryrefslogtreecommitdiffstats
path: root/src/savehdr.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-11-16 12:53:21 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2008-11-16 12:53:21 +0100
commit07b1742903d2b483ca4afc1d39d1b644eb755e5a (patch)
treea72a91c3d25247474c5c91e5ce30a85c3e23d64d /src/savehdr.c
parent8453cfff02206ad932e8ddd3c24b34aa7c42af62 (diff)
Code cleanup after using LLVM/Clang Static Analyzer
Diffstat (limited to 'src/savehdr.c')
-rw-r--r--src/savehdr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/savehdr.c b/src/savehdr.c
index 0cbea56..fb78963 100644
--- a/src/savehdr.c
+++ b/src/savehdr.c
@@ -80,11 +80,11 @@ int save_header(disk_t *disk_car,partition_t *partition, const int verbose)
(unsigned long)(partition->part_size/disk_car->sector_size));
}
if(fwrite(buffer,DEFAULT_SECTOR_SIZE,1,f_backup)!=1)
- res=-1;
+ res = -1;
if(res>=0 && disk_car->read(disk_car,256*DEFAULT_SECTOR_SIZE, buffer, partition->part_offset)!=0)
- res=-1;
+ res = -1;
if(res>=0 && fwrite(buffer,DEFAULT_SECTOR_SIZE,256,f_backup)!=256)
- res=-1;
+ res = -1;
fclose(f_backup);
free(buffer);
return res;