summaryrefslogtreecommitdiff
path: root/util/ntptime.c
diff options
context:
space:
mode:
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;