Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/ntp/sntp compile cleanly with -Wall (ntp bug #258)
details: https://anonhg.NetBSD.org/src/rev/2a6037d79b8f
branches: trunk
changeset: 555932:2a6037d79b8f
user: drochner <drochner%NetBSD.org@localhost>
date: Thu Dec 04 17:17:36 2003 +0000
description:
compile cleanly with -Wall (ntp bug #258)
diffstat:
dist/ntp/sntp/internet.c | 4 +---
dist/ntp/sntp/main.c | 21 +++++++++++++++++++--
dist/ntp/sntp/socket.c | 6 ++++--
3 files changed, 24 insertions(+), 7 deletions(-)
diffs (80 lines):
diff -r 83d812021124 -r 2a6037d79b8f dist/ntp/sntp/internet.c
--- a/dist/ntp/sntp/internet.c Thu Dec 04 17:15:26 2003 +0000
+++ b/dist/ntp/sntp/internet.c Thu Dec 04 17:17:36 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: internet.c,v 1.2 2003/12/04 16:23:38 drochner Exp $ */
+/* $NetBSD: internet.c,v 1.3 2003/12/04 17:17:36 drochner Exp $ */
/* Copyright (C) 1996 N.M. Maclaren
Copyright (C) 1996 The University of Cambridge
@@ -73,8 +73,6 @@
int family, rval;
struct addrinfo hints;
struct addrinfo *res;
- struct sockaddr_in *sin;
- struct sockaddr_in6 *sin6;
res = NULL;
memset(address, 0, sizeof(struct sockaddr_storage));
diff -r 83d812021124 -r 2a6037d79b8f dist/ntp/sntp/main.c
--- a/dist/ntp/sntp/main.c Thu Dec 04 17:15:26 2003 +0000
+++ b/dist/ntp/sntp/main.c Thu Dec 04 17:17:36 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.2 2003/12/04 16:23:38 drochner Exp $ */
+/* $NetBSD: main.c,v 1.3 2003/12/04 17:17:36 drochner Exp $ */
/* Copyright (C) 1996, 1997, 2000 N.M. Maclaren
Copyright (C) 1996, 1997, 2000 The University of Cambridge
@@ -243,7 +243,24 @@
double dispersion, weight, when, offset, error;
} data_record;
-
+void syntax(int);
+void display_data(ntp_data *);
+void display_packet(unsigned char *, int);
+void pack_ntp(unsigned char *, int, ntp_data *);
+void unpack_ntp(ntp_data *, unsigned char *, int);
+void make_packet(ntp_data *, int);
+int read_packet(int, ntp_data *, double *, double *);
+void format_time(char *, int, double, double, double, double);
+double reset_clock(double, double, int);
+void run_server(void);
+double estimate_stats(int *, int *, data_record *, double, double *, double *,
+ double *, double *, double *, double *, int *, int);
+double correct_drift(double *, double *, double);
+void handle_saving(int, int *, int *, int *, data_record *, double *,
+ double *, double *);
+void query_savefile(void);
+void run_daemon(char **, int, int);
+void run_client(char **, int);
void fatal (int syserr, const char *message, const char *insert) {
diff -r 83d812021124 -r 2a6037d79b8f dist/ntp/sntp/socket.c
--- a/dist/ntp/sntp/socket.c Thu Dec 04 17:15:26 2003 +0000
+++ b/dist/ntp/sntp/socket.c Thu Dec 04 17:17:36 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: socket.c,v 1.2 2003/12/04 16:23:38 drochner Exp $ */
+/* $NetBSD: socket.c,v 1.3 2003/12/04 17:17:36 drochner Exp $ */
/* Copyright (C) 1996, 2000 N.M. Maclaren
Copyright (C) 1996, 2000 The University of Cambridge
@@ -32,6 +32,8 @@
static struct sockaddr_in here[MAX_SOCKETS], there[MAX_SOCKETS];
#endif
+void display_in_hex(const void *, int);
+void display_sock_in_hex(struct sockaddr_storage *);
/* There needs to be some disgusting grobble for handling timeouts, that is
identical to the grobble in internet.c. */
@@ -65,7 +67,7 @@
#ifdef HAVE_IPV6
void display_sock_in_hex (struct sockaddr_storage *sock) {
- int family, len;
+ int family;
struct sockaddr_in *sin;
struct sockaddr_in6 *sin6;
Home |
Main Index |
Thread Index |
Old Index