summaryrefslogtreecommitdiffstats
path: root/src/sysv.c
diff options
context:
space:
mode:
authorChristophe Grenier <[email protected]>2020-11-27 18:47:59 +0100
committerChristophe Grenier <[email protected]>2020-11-27 18:47:59 +0100
commit57b93502c6f9be9d5af39839174d59dc29eda46c (patch)
treeb42825638083caf014099402a996306d6329817f /src/sysv.c
parent92e07c9b131f3dfabfcaebf7d4103543b70f5ddf (diff)
sysv: use unsigned int when checking the signature
Diffstat (limited to 'src/sysv.c')
-rw-r--r--src/sysv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sysv.c b/src/sysv.c
index e8ecdb21..2d22352b 100644
--- a/src/sysv.c
+++ b/src/sysv.c
@@ -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));