diff options
author | Denis Vlasenko | 2006-10-08 12:49:22 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-08 12:49:22 +0000 |
commit | 1385899416a4396385ad421ae1f532be7103738a (patch) | |
tree | fc4d14a910593d1235318bb36abe5e9f72d2039e /miscutils/hdparm.c | |
parent | 5625415085e68ac5e150f54e685417c866620d76 (diff) | |
download | busybox-1385899416a4396385ad421ae1f532be7103738a.zip busybox-1385899416a4396385ad421ae1f532be7103738a.tar.gz |
attempt to regularize atoi mess.
Diffstat (limited to 'miscutils/hdparm.c')
-rw-r--r-- | miscutils/hdparm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 6c46f6a..1c9a99e 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -2063,7 +2063,7 @@ static void parse_opts(unsigned long *get, unsigned long *set, unsigned long *va } if (optarg) { *set = 1; - *value = bb_xgetlarg(optarg, 10, min, max); + *value = xatol_range(optarg, min, max); } } @@ -2154,8 +2154,8 @@ int hdparm_main(int argc, char **argv) #if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF if (c == 'R') { parse_opts(NULL, &scan_hwif, &hwif_data, 0, INT_MAX); - hwif_ctrl = bb_xgetlarg((argv[optind]) ? argv[optind] : "", 10, 0, INT_MAX); - hwif_irq = bb_xgetlarg((argv[optind+1]) ? argv[optind+1] : "", 10, 0, INT_MAX); + hwif_ctrl = xatoi_u((argv[optind]) ? argv[optind] : ""); + hwif_irq = xatoi_u((argv[optind+1]) ? argv[optind+1] : ""); /* Move past the 2 additional arguments */ argv += 2; argc -= 2; |