summaryrefslogtreecommitdiff
path: root/usr.sbin/rdate/rfc868time.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-16 11:00:54 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-16 11:00:54 +0000
commitd28d4ca89cf157cfbd6422626242b79f6f6baf5a (patch)
treeafd02a387345238e79a04dfa5e4210a48b567e85 /usr.sbin/rdate/rfc868time.c
parenta8a54d789fa8277d2e4301155f701c435201e420 (diff)
bit more KNF
Diffstat (limited to 'usr.sbin/rdate/rfc868time.c')
-rw-r--r--usr.sbin/rdate/rfc868time.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr.sbin/rdate/rfc868time.c b/usr.sbin/rdate/rfc868time.c
index 4f138837990..ce316f6cbe0 100644
--- a/usr.sbin/rdate/rfc868time.c
+++ b/usr.sbin/rdate/rfc868time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfc868time.c,v 1.1 2002/05/16 10:46:34 jakob Exp $ */
+/* $OpenBSD: rfc868time.c,v 1.2 2002/05/16 11:00:53 deraadt Exp $ */
/* $NetBSD: rdate.c,v 1.4 1996/03/16 12:37:45 pk Exp $ */
/*
@@ -33,8 +33,8 @@
/*
* rdate.c: Set the date from the specified host
- *
- * Uses the rfc868 time protocol at socket 37.
+ *
+ * Uses the rfc868 time protocol at socket 37.
* Time is returned as the number of seconds since
* midnight January 1st 1900.
*/
@@ -42,7 +42,7 @@
#if 0
from: static char rcsid[] = "$NetBSD: rdate.c,v 1.3 1996/02/22 06:59:18 thorpej Exp $";
#else
-static const char rcsid[] = "$OpenBSD: rfc868time.c,v 1.1 2002/05/16 10:46:34 jakob Exp $";
+static const char rcsid[] = "$OpenBSD: rfc868time.c,v 1.2 2002/05/16 11:00:53 deraadt Exp $";
#endif
#endif /* lint */
@@ -68,14 +68,13 @@ void
rfc868time_client (const char *hostname,
struct timeval *new, struct timeval *adjust)
{
- struct hostent *hp;
- struct servent *sp, ssp;
struct protoent *pp, ppp;
+ struct servent *sp, ssp;
struct sockaddr_in sin;
-
- int s;
+ struct hostent *hp;
struct timeval old;
time_t tim;
+ int s;
if ((hp = gethostbyname(hostname)) == NULL)
errx(1, "%s: %s", hostname, hstrerror(h_errno));