diff options
author | Christophe Grenier <[email protected]> | 2020-11-27 18:47:59 +0100 |
---|---|---|
committer | Christophe Grenier <[email protected]> | 2020-11-27 18:47:59 +0100 |
commit | 57b93502c6f9be9d5af39839174d59dc29eda46c (patch) | |
tree | b42825638083caf014099402a996306d6329817f /src/sysv.c | |
parent | 92e07c9b131f3dfabfcaebf7d4103543b70f5ddf (diff) |
sysv: use unsigned int when checking the signature
Diffstat (limited to 'src/sysv.c')
-rw-r--r-- | src/sysv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)); |