hdparm: placate "warning: taking the absolute value of unsigned type"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
9a0c404d5f
commit
122a8cbd4a
@ -996,7 +996,7 @@ static void identify(uint16_t *val)
|
|||||||
/* check Endian of capacity bytes */
|
/* check Endian of capacity bytes */
|
||||||
nn = val[LCYLS_CUR] * val[LHEADS_CUR] * val[LSECTS_CUR];
|
nn = val[LCYLS_CUR] * val[LHEADS_CUR] * val[LSECTS_CUR];
|
||||||
oo = (uint32_t)val[CAPACITY_LSB] << 16 | val[CAPACITY_MSB];
|
oo = (uint32_t)val[CAPACITY_LSB] << 16 | val[CAPACITY_MSB];
|
||||||
if (abs(mm - nn) > abs(oo - nn))
|
if (abs((int)(mm - nn)) > abs((int)(oo - nn)))
|
||||||
mm = oo;
|
mm = oo;
|
||||||
}
|
}
|
||||||
printf("\tCHS current addressable sectors:%11u\n", mm);
|
printf("\tCHS current addressable sectors:%11u\n", mm);
|
||||||
|
Loading…
Reference in New Issue
Block a user