diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-14 23:00:26 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-14 23:00:26 +0000 |
commit | dd2b2f75ae3a826731ae40a79812ebe94c58ac88 (patch) | |
tree | 49121833dbb5d2a30adacb2c3d3278e2014ba7e6 /miscutils/adjtimex.c | |
parent | 56594075951157801d172851ec38b0eee1b0f44b (diff) | |
download | busybox-w32-dd2b2f75ae3a826731ae40a79812ebe94c58ac88.tar.gz busybox-w32-dd2b2f75ae3a826731ae40a79812ebe94c58ac88.tar.bz2 busybox-w32-dd2b2f75ae3a826731ae40a79812ebe94c58ac88.zip |
adjtimex: fix argument types (most importantly, allow negative ones)
Diffstat (limited to '')
-rw-r--r-- | miscutils/adjtimex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 985ee2d0c..22fd39e8e 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c | |||
@@ -55,19 +55,19 @@ int adjtimex_main(int argc, char **argv) | |||
55 | &opt_o, &opt_f, &opt_p, &opt_t); | 55 | &opt_o, &opt_f, &opt_p, &opt_t); |
56 | //if (opt & 0x1) // -q | 56 | //if (opt & 0x1) // -q |
57 | if (opt & 0x2) { // -o | 57 | if (opt & 0x2) { // -o |
58 | txc.offset = xatoi(opt_o); | 58 | txc.offset = xatol(opt_o); |
59 | txc.modes |= ADJ_OFFSET_SINGLESHOT; | 59 | txc.modes |= ADJ_OFFSET_SINGLESHOT; |
60 | } | 60 | } |
61 | if (opt & 0x4) { // -f | 61 | if (opt & 0x4) { // -f |
62 | txc.freq = xatou(opt_f); | 62 | txc.freq = xatol(opt_f); |
63 | txc.modes |= ADJ_FREQUENCY; | 63 | txc.modes |= ADJ_FREQUENCY; |
64 | } | 64 | } |
65 | if (opt & 0x8) { // -p | 65 | if (opt & 0x8) { // -p |
66 | txc.constant = xatoi(opt_p); | 66 | txc.constant = xatol(opt_p); |
67 | txc.modes |= ADJ_TIMECONST; | 67 | txc.modes |= ADJ_TIMECONST; |
68 | } | 68 | } |
69 | if (opt & 0x10) { // -t | 69 | if (opt & 0x10) { // -t |
70 | txc.tick = xatoi(opt_t); | 70 | txc.tick = xatol(opt_t); |
71 | txc.modes |= ADJ_TICK; | 71 | txc.modes |= ADJ_TICK; |
72 | } | 72 | } |
73 | if (argc != optind) { /* no valid non-option parameters */ | 73 | if (argc != optind) { /* no valid non-option parameters */ |