diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-08 16:49:22 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-08 16:49:22 +0400 |
commit | 1385899416a4396385ad421ae1f532be7103738a (patch) | |
tree | fc4d14a910593d1235318bb36abe5e9f72d2039e /miscutils/adjtimex.c | |
parent | 5625415085e68ac5e150f54e685417c866620d76 (diff) |
attempt to regularize atoi mess.
Diffstat (limited to 'miscutils/adjtimex.c')
-rw-r--r-- | miscutils/adjtimex.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 47af1a5d2..b35538a84 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -12,10 +12,6 @@ */ #include "busybox.h" -#include <stdio.h> -#include <sys/types.h> -#include <stdlib.h> -#include <unistd.h> #include <sys/timex.h> static const struct {int bit; const char *name;} statlist[] = { @@ -58,19 +54,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 = atoi(opt_o); + txc.offset = xatoi(opt_o); txc.modes |= ADJ_OFFSET_SINGLESHOT; } if (opt & 0x4) { // -f - txc.freq = atoi(opt_f); + txc.freq = xatou(opt_f); txc.modes |= ADJ_FREQUENCY; } if (opt & 0x8) { // -p - txc.constant = atoi(opt_p); + txc.constant = xatoi(opt_p); txc.modes |= ADJ_TIMECONST; } if (opt & 0x10) { // -t - txc.tick = atoi(opt_t); + txc.tick = xatoi(opt_t); txc.modes |= ADJ_TICK; } if (argc != optind) { /* no valid non-option parameters */ |