From: Harlan Stenn Date: Tue, 18 Jan 2011 12:35:26 +0000 (+0000) Subject: autogen and debug cleanup X-Git-Tag: NTP_4_2_7P131~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe1fd8fc4e219f6f268c74af901490582c9dad3e;p=thirdparty%2Fntp.git autogen and debug cleanup bk: 4d35890e844vND1AkxwDw-k7bfSTwg --- diff --git a/sntp/main.c b/sntp/main.c index 8e4a2277f..7f61a8df2 100644 --- a/sntp/main.c +++ b/sntp/main.c @@ -103,16 +103,12 @@ sntp_main ( argc -= optct; argv += optct; -#ifdef DEBUG debug = DESC(DEBUG_LEVEL).optOccCt; DPRINTF(1, ("%s\n", Version)); -#endif - if (atoint(OPT_ARG(NTPVERSION), &l)) - ntpver = l; + ntpver = OPT_VALUE_NTPVERSION; - if (atoint(OPT_ARG(STEPLIMIT), &l)) - steplimit = (double)l / 1000; + steplimit = (double) ( OPT_VALUE_STEPLIMIT ) / 1000; /* Initialize logging system */ init_logging(); @@ -129,10 +125,7 @@ sntp_main ( ** - separate bcst and ucst timeouts ** - multiple --timeout values in the commandline */ - if (atoint(OPT_ARG(BCTIMEOUT), &l)) - timeout_tv.tv_sec = l; - else - timeout_tv.tv_sec = 68; /* ntpd broadcasts every 64s */ + timeout_tv.tv_sec = OPT_VALUE_BCTIMEOUT; timeout_tv.tv_usec = 0; /* IPv6 available? */ @@ -182,7 +175,7 @@ sntp_main ( open_sockets(); if (HAVE_OPT(BROADCAST)) { - int cn = STACKCT_OPT( BROADCAST ); + int cn = STACKCT_OPT( BROADCAST ); const char ** cp = STACKLST_OPT( BROADCAST ); while (cn-- > 0) { @@ -779,7 +772,6 @@ offset_calculation ( *root_dispersion = FPTOD(p_rdsp); -#ifdef DEBUG if (debug > 2) { printf("sntp rootdelay: %f\n", FPTOD(p_rdly)); printf("sntp rootdisp: %f\n", *root_dispersion); @@ -799,7 +791,6 @@ offset_calculation ( printf("sntp offset_calculation: rpkt->xmt:\n"); l_fp_output(&(rpkt->xmt), stdout); } -#endif /* Compute offset etc. */ tmp = p_rec; diff --git a/sntp/main.h b/sntp/main.h index ab4135033..df356f12f 100644 --- a/sntp/main.h +++ b/sntp/main.h @@ -4,6 +4,7 @@ #include #include #include +#define DEBUG #include #include #include