summaryrefslogtreecommitdiff
path: root/util/ntptime.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-07 08:29:34 +0000
committer <>2015-04-13 18:52:43 +0000
commitb2ccf8dd31d1457ae9f0ae270054117179220370 (patch)
tree4ccd4a16d5e9ef5869630ba624e822665a6e248c /util/ntptime.c
parentbdab5265fcbf3f472545073a23f8999749a9f2b9 (diff)
downloadntp-master.tar.gz
Imported from /home/lorry/working-area/delta_ntp/ntp-4.2.8p2.tar.gz.HEADntp-4.2.8p2master
Diffstat (limited to 'util/ntptime.c')
-rw-r--r--util/ntptime.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/util/ntptime.c b/util/ntptime.c
index dd5605c..5a6c1d1 100644
--- a/util/ntptime.c
+++ b/util/ntptime.c
@@ -98,15 +98,16 @@ main(
volatile unsigned ts_mask = TS_MASK; /* defaults to 20 bits (us) */
volatile unsigned ts_roundbit = TS_ROUNDBIT; /* defaults to 20 bits (us) */
volatile int fdigits = 6; /* fractional digits for us */
- int c;
+ size_t c;
+ int ch;
int errflg = 0;
int cost = 0;
volatile int rawtime = 0;
ZERO(ntx);
progname = argv[0];
- while ((c = ntp_getopt(argc, argv, optargs)) != EOF) {
- switch (c) {
+ while ((ch = ntp_getopt(argc, argv, optargs)) != EOF) {
+ switch (ch) {
#ifdef MOD_MICRO
case 'M':
ntx.modes |= MOD_MICRO;
@@ -467,7 +468,7 @@ timex_state(
{
static char buf[32];
- if (s >= 0 && s < COUNTOF(timex_states))
+ if ((size_t)s < COUNTOF(timex_states))
return timex_states[s];
snprintf(buf, sizeof(buf), "TIME-#%d", s);
return buf;