sysv: use unsigned int when checking the signature
This commit is contained in:
parent
92e07c9b13
commit
57b93502c6
2 changed files with 3 additions and 3 deletions
|
@ -247,7 +247,7 @@ int search_type_1(const unsigned char *buffer, const disk_t *disk, partition_t *
|
|||
if(cramfs->magic==le32(CRAMFS_MAGIC) &&
|
||||
recover_cramfs(disk, cramfs, partition, verbose, dump_ind)==0)
|
||||
return 1;
|
||||
if((sysv4->s_magic == (signed)le32(0xfd187e20) || sysv4->s_magic == (signed)be32(0xfd187e20)) &&
|
||||
if(((unsigned)sysv4->s_magic == le32(0xfd187e20) || (unsigned)sysv4->s_magic == be32(0xfd187e20)) &&
|
||||
recover_sysv(disk, sysv4, partition, verbose, dump_ind)==0)
|
||||
return 1;
|
||||
if(memcmp((const char *)lvm2->type, LVM2_LABEL, sizeof(lvm2->type)) == 0 &&
|
||||
|
|
|
@ -81,7 +81,7 @@ int check_sysv(disk_t *disk_car,partition_t *partition,const int verbose)
|
|||
|
||||
static int test_sysv4(const disk_t *disk_car, const struct sysv4_super_block *sbd, const partition_t *partition, const int verbose)
|
||||
{
|
||||
if (sbd->s_magic != (signed)le32(0xfd187e20) && sbd->s_magic != (signed)be32(0xfd187e20))
|
||||
if ((unsigned)sbd->s_magic != le32(0xfd187e20) && (unsigned)sbd->s_magic != be32(0xfd187e20))
|
||||
return 1;
|
||||
if(verbose>0)
|
||||
log_info("\nSYSV4 Marker at %u/%u/%u\n",
|
||||
|
@ -103,7 +103,7 @@ int recover_sysv(const disk_t *disk_car, const struct sysv4_super_block *sbd, p
|
|||
dump_log(sbd,sizeof(*sbd));
|
||||
}
|
||||
}
|
||||
switch(sbd->s_magic)
|
||||
switch((unsigned)sbd->s_magic)
|
||||
{
|
||||
case le32(0xfd187e20):
|
||||
partition->part_size = (uint64_t)le32(sbd->s_fsize)*(512<<(le32(sbd->s_type)-1));
|
||||
|
|
Loading…
Reference in a new issue