projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a0c404
)
hdparm: placate "warning: taking the absolute value of unsigned type"
author
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 25 Oct 2019 15:47:22 +0000
(17:47 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 25 Oct 2019 15:47:22 +0000
(17:47 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/hdparm.c
patch
|
blob
|
history
diff --git
a/miscutils/hdparm.c
b/miscutils/hdparm.c
index b453efba9f4dc77a75fa3132ed50cc618b451290..beabb1ad51b9166b2e18f9f5b7f7fc9c4ce17f96 100644
(file)
--- a/
miscutils/hdparm.c
+++ b/
miscutils/hdparm.c
@@
-996,7
+996,7
@@
static void identify(uint16_t *val)
/* check Endian of capacity bytes */
nn = val[LCYLS_CUR] * val[LHEADS_CUR] * val[LSECTS_CUR];
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;
}
printf("\tCHS current addressable sectors:%11u\n", mm);