From: Ivo Timmermans Date: Fri, 3 Nov 2000 22:35:12 +0000 (+0000) Subject: Warnings removal pass: always include config.h first; add a few X-Git-Tag: release-1.0pre3~31 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5065ea32c32e27478d93c00a1bba0c812b7a2b8c;p=oweals%2Ftinc.git Warnings removal pass: always include config.h first; add a few prototypes in the header files. This also fixes a few lint errors/warnings. --- diff --git a/src/conf.c b/src/conf.c index 7780a0b..477d0fd 100644 --- a/src/conf.c +++ b/src/conf.c @@ -19,9 +19,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: conf.c,v 1.9.4.19 2000/10/29 00:24:31 guus Exp $ + $Id: conf.c,v 1.9.4.20 2000/11/03 22:35:10 zarq Exp $ */ +#include "config.h" #include #include @@ -30,7 +31,6 @@ #include #include #include -#include #include diff --git a/src/connlist.c b/src/connlist.c index ac6970b..89b11fb 100644 --- a/src/connlist.c +++ b/src/connlist.c @@ -17,9 +17,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: connlist.c,v 1.1.2.11 2000/10/29 02:07:39 guus Exp $ + $Id: connlist.c,v 1.1.2.12 2000/11/03 22:35:10 zarq Exp $ */ +#include "config.h" + +#include #include #include "net.h" /* Don't ask. */ diff --git a/src/connlist.h b/src/connlist.h index 69bef9e..8f974c9 100644 --- a/src/connlist.h +++ b/src/connlist.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: connlist.h,v 1.1.2.9 2000/10/29 22:55:14 guus Exp $ + $Id: connlist.h,v 1.1.2.10 2000/11/03 22:35:10 zarq Exp $ */ #ifndef __TINC_CONNLIST_H__ @@ -109,5 +109,7 @@ extern void conn_list_del(conn_list_t *); extern conn_list_t *lookup_id(char *); extern void dump_conn_list(void); extern int read_host_config(conn_list_t *); +extern void destroy_conn_list(void); +extern void prune_conn_list(void); #endif /* __TINC_CONNLIST_H__ */ diff --git a/src/protocol.c b/src/protocol.c index 40acfbb..aeeec1b 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.c,v 1.28.4.53 2000/10/29 22:55:14 guus Exp $ + $Id: protocol.c,v 1.28.4.54 2000/11/03 22:35:11 zarq Exp $ */ #include "config.h" @@ -174,7 +174,7 @@ cp int id_h(conn_list_t *cl) { conn_list_t *old; - config_t *cfg; + config_t const *cfg; cp if(sscanf(cl->buffer, "%*d %as %d %lx %hd", &cl->name, &cl->protocol_version, &cl->options, &cl->port) != 4) { @@ -803,6 +803,7 @@ int add_host_h(conn_list_t *cl) { conn_list_t *old, *new; conn_list_t *p; + cp new = new_conn_list(); diff --git a/src/protocol.h b/src/protocol.h index 91c0cfb..82e3f90 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.h,v 1.5.4.14 2000/10/29 22:55:15 guus Exp $ + $Id: protocol.h,v 1.5.4.15 2000/11/03 22:35:12 zarq Exp $ */ #ifndef __TINC_PROTOCOL_H__ @@ -69,5 +69,7 @@ extern int send_ans_key(conn_list_t*, conn_list_t*, char*); extern int send_tcppacket(conn_list_t *, void *, int); extern int notify_others(conn_list_t *, conn_list_t *, int (*function)(conn_list_t*, conn_list_t*)); +extern int receive_request(conn_list_t *); +extern int check_id(char *); #endif /* __TINC_PROTOCOL_H__ */ diff --git a/src/subnet.c b/src/subnet.c index 1a9a560..9fceea8 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -17,21 +17,22 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: subnet.c,v 1.1.2.8 2000/10/29 00:02:20 guus Exp $ + $Id: subnet.c,v 1.1.2.9 2000/11/03 22:35:12 zarq Exp $ */ -#include -#include - #include "config.h" -#include -#include -#include "subnet.h" -#include "net.h" +#include +#include + #include "conf.h" +#include "net.h" +#include "subnet.h" #include "system.h" +#include +#include + /* lists type of subnet */ subnet_t *subnet_list[SUBNET_TYPES] = { NULL };