summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/ntpq
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 03:57:47 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 03:57:47 +0000
commit4f960dd75f181e9fa2edc44324f15f0ab5c64b37 (patch)
tree15a9c7203efd47ba6dde2896fdb6327dddd4547f /usr.sbin/xntpd/ntpq
parent30ef9631c5eac7f8254bd3d7ad274d34d9f518b8 (diff)
downloadFreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.zip
FreeBSD-src-4f960dd75f181e9fa2edc44324f15f0ab5c64b37.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'usr.sbin/xntpd/ntpq')
-rw-r--r--usr.sbin/xntpd/ntpq/ntpq.c50
-rw-r--r--usr.sbin/xntpd/ntpq/ntpq_ops.c22
2 files changed, 36 insertions, 36 deletions
diff --git a/usr.sbin/xntpd/ntpq/ntpq.c b/usr.sbin/xntpd/ntpq/ntpq.c
index 441b283..2c5eacf 100644
--- a/usr.sbin/xntpd/ntpq/ntpq.c
+++ b/usr.sbin/xntpd/ntpq/ntpq.c
@@ -146,7 +146,7 @@ struct ctl_var peer_var[] = {
{ CP_RECEIVED, UI, "received" }, /* 31 */
{ CP_SENT, UI, "sent" }, /* 32 */
{ CP_FILTERROR, AR, "filterror" }, /* 33 */
- { CP_FLASH, TST, "flash"}, /* 34 */
+ { CP_FLASH, TST, "flash"}, /* 34 */
{ CP_DISP, AR, "disp" }, /* 35 */
/*
* These are duplicate entries so that we can
@@ -608,7 +608,7 @@ openhost(hname)
if (!getnetnum(hname, &netnum, temphost))
return 0;
-
+
if (debug > 2)
printf("Opening host %s\n", temphost);
@@ -627,7 +627,7 @@ openhost(hname)
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd == -1)
error("socket", "", "");
-
+
#if defined(SYS_HPUX) && (SYS_HPUX < 8)
#ifdef SO_RCVBUF
{ int rbufsize = DATASIZE + 2048; /* 2K for slop */
@@ -641,7 +641,7 @@ openhost(hname)
if (connect(sockfd, (struct sockaddr *)&hostaddr,
sizeof(hostaddr)) == -1)
error("connect", "", "");
-
+
havehost = 1;
return 1;
}
@@ -726,7 +726,7 @@ again:
tvo = tvout;
else
tvo = tvsout;
-
+
FD_SET(sockfd, &fds);
n = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvo);
@@ -954,22 +954,22 @@ again:
printf("Number of fragments exceeds maximum\n");
return ERR_TOOMUCH;
}
-
+
for (n = 0; n < numfrags; n++) {
if (offset == offsets[n])
goto again; /* duplicate */
if (offset < offsets[n])
break;
}
-
+
if ((u_short)(n > 0 && offsets[n-1] + counts[n-1]) > offset)
goto overlap;
if (n < numfrags && (u_short)(offset + count) > offsets[n])
goto overlap;
-
+
{
register int i;
-
+
for (i = numfrags; i > n; i--) {
offsets[i] = offsets[i-1];
counts[i] = counts[i-1];
@@ -1162,7 +1162,7 @@ again:
res = sendrequest(opcode, associd, auth, qsize, qdata);
if (res != 0)
return res;
-
+
/*
* Get the response. If we got a standard error, print a message
*/
@@ -1286,7 +1286,7 @@ docmd(cmdline)
tokenize(cmdline, tokens, &ntok);
if (ntok == 0)
return;
-
+
/*
* Find the appropriate command description.
*/
@@ -1300,7 +1300,7 @@ docmd(cmdline)
tokens[0]);
return;
}
-
+
/*
* Save the keyword, then walk through the arguments, interpreting
* as we go.
@@ -1623,7 +1623,7 @@ rtdatetolfp(str, lfp)
if (*cp++ != '-')
return 0;
-
+
for (i = 0; i < 3; i++)
buf[i] = *cp++;
buf[3] = '\0';
@@ -1637,7 +1637,7 @@ rtdatetolfp(str, lfp)
if (*cp++ != '-')
return 0;
-
+
if (!isdigit(*cp))
return 0;
cal.year = *cp++ - '0';
@@ -2488,7 +2488,7 @@ statustoa(type, st)
(void)strcat(cb, ", ");
(void)strcat(cb, getcode(CTL_SYS_EVENT(st), sys_codes));
break;
-
+
case TYPE_PEER:
/*
* Handcraft the bits
@@ -2535,7 +2535,7 @@ statustoa(type, st)
peer_codes));
}
break;
-
+
case TYPE_CLOCK:
(void)strcpy(cb, getcode(((st)>>8) & 0xff, clock_codes));
(void)strcat(cb, ", last_");
@@ -2573,7 +2573,7 @@ nextvar(datalen, datap, vname, vvalue)
cp++;
if (cp == cpend)
return 0;
-
+
/*
* Copy name until we hit a ',', an '=', a '\r' or a '\n'. Backspace
* over any white space and terminate it.
@@ -2800,7 +2800,7 @@ outputarr(fp, name, narr, lfp)
*/
if ((int)strlen(name) < 10)
*bp++ = ' ';
-
+
for (i = narr; i > 0; i--) {
if (i != narr)
*bp++ = ' ';
@@ -2937,14 +2937,14 @@ cookedprint(datatype, length, data, status, fp)
}
}
break;
-
+
case UI:
if (!decodeuint(value, &uval))
output_raw = '?';
else
output(fp, name, uinttoa(uval));
break;
-
+
case IN:
if (!decodeint(value, &ival))
output_raw = '?';
@@ -2961,11 +2961,11 @@ cookedprint(datatype, length, data, status, fp)
else
output(fp, name, numtoa(hval));
break;
-
+
case ST:
output_raw = '*';
break;
-
+
case RF:
if (decodenetnum(value, &hval))
output(fp, name, nntohost(hval));
@@ -3000,14 +3000,14 @@ cookedprint(datatype, length, data, status, fp)
output(fp, name, b);
}
break;
-
+
case MD:
if (!decodeuint(value, &uval))
output_raw = '?';
else
output(fp, name, uinttoa(uval));
break;
-
+
case AR:
if (!decodearr(value, &narr, lfparr))
output_raw = '?';
@@ -3021,7 +3021,7 @@ cookedprint(datatype, length, data, status, fp)
else
output(fp, name, tstflags(uval));
break;
-
+
default:
(void) fprintf(stderr,
"Internal error in cookedprint, %s=%s, fmt %d\n",
diff --git a/usr.sbin/xntpd/ntpq/ntpq_ops.c b/usr.sbin/xntpd/ntpq/ntpq_ops.c
index 8bab73d..8e59a71 100644
--- a/usr.sbin/xntpd/ntpq/ntpq_ops.c
+++ b/usr.sbin/xntpd/ntpq/ntpq_ops.c
@@ -370,7 +370,7 @@ makequerydata(vlist, datalen, data)
totallen = namelen + valuelen + (valuelen != 0) + (cp != data);
if (cp + totallen > cpend)
break;
-
+
if (cp != data)
*cp++ = ',';
memmove(cp, vl->name, namelen);
@@ -833,15 +833,15 @@ dogetassoc(fp)
res = doquery(CTL_OP_READSTAT, 0, 0, 0, (char *)0, &rstatus,
&dsize, (char **)&datap);
-
+
if (res != 0)
return 0;
-
+
if (dsize == 0) {
(void) fprintf(fp, "No association ID's returned\n");
return 0;
}
-
+
if (dsize & 0x3) {
(void) fprintf(stderr,
"***Server returned %d octets, should be multiple of 4\n",
@@ -964,7 +964,7 @@ printassoc(showall, fp)
condition = "sys.peer";
break;
}
-
+
} else {
reach = "no";
auth = condition = "";
@@ -1164,7 +1164,7 @@ when(ts, rec, reftime)
lasttime = reftime;
else
return "-";
-
+
diff = (long)(ts->l_ui - lasttime->l_ui);
if (diff <= 0) {
/*
@@ -1237,7 +1237,7 @@ struct varlist peervarlist[] = {
#define HAVE_REFID 1
#define HAVE_STRATUM 2
#define HAVE_HPOLL 3
-#define HAVE_PPOLL 4
+#define HAVE_PPOLL 4
#define HAVE_REACH 5
#define HAVE_DELAY 6
#define HAVE_OFFSET 7
@@ -1286,7 +1286,7 @@ doprintpeers(pvl, associd, rstatus, datalen, data, fp)
memset((char *)havevar, 0, sizeof(havevar));
gettstamp(&ts);
-
+
while (nextvar(&datalen, &data, &name, &value)) {
u_long dummy;
i = findvar(name, peer_var);
@@ -1405,7 +1405,7 @@ doprintpeers(pvl, associd, rstatus, datalen, data, fp)
pvl[i].name, associd);
return 0;
}
-
+
/*
* Got everything, format the line
@@ -1439,7 +1439,7 @@ doprintpeers(pvl, associd, rstatus, datalen, data, fp)
#undef HAVE_REC
#undef HAVE_SRCPORT
#undef HAVE_REFTIME
-#undef MAXHAVE
+#undef MAXHAVE
/*
@@ -1478,7 +1478,7 @@ dogetpeers(pvl, associd, fp)
return 0;
}
-
+
return doprintpeers(pvl, associd, (int)rstatus, dsize, datap, fp);
}
OpenPOWER on IntegriCloud