summaryrefslogtreecommitdiffhomepage
path: root/miscutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-14 23:00:26 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-14 23:00:26 +0000
commitdd2b2f75ae3a826731ae40a79812ebe94c58ac88 (patch)
tree49121833dbb5d2a30adacb2c3d3278e2014ba7e6 /miscutils
parent56594075951157801d172851ec38b0eee1b0f44b (diff)
adjtimex: fix argument types (most importantly, allow negative ones)
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/adjtimex.c8
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)
&opt_o, &opt_f, &opt_p, &opt_t);
//if (opt & 0x1) // -q
if (opt & 0x2) { // -o
- txc.offset = xatoi(opt_o);
+ txc.offset = xatol(opt_o);
txc.modes |= ADJ_OFFSET_SINGLESHOT;
}
if (opt & 0x4) { // -f
- txc.freq = xatou(opt_f);
+ txc.freq = xatol(opt_f);
txc.modes |= ADJ_FREQUENCY;
}
if (opt & 0x8) { // -p
- txc.constant = xatoi(opt_p);
+ txc.constant = xatol(opt_p);
txc.modes |= ADJ_TIMECONST;
}
if (opt & 0x10) { // -t
- txc.tick = xatoi(opt_t);
+ txc.tick = xatol(opt_t);
txc.modes |= ADJ_TICK;
}
if (argc != optind) { /* no valid non-option parameters */