X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fconnection.c;h=7f48697d77188dccf9053706541767f72ba632a1;hp=61657a3b9d792342d0a6e48e9d6c7f9a19b5e864;hb=cf49b2c0647554613874cce495e4a7937a9f7863;hpb=f8b4a000d008082e5c7e511a49318b8dea8fd08d diff --git a/src/connection.c b/src/connection.c index 61657a3b..7f48697d 100644 --- a/src/connection.c +++ b/src/connection.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: connection.c,v 1.1.2.4 2000/11/22 18:54:07 guus Exp $ + $Id: connection.c,v 1.1.2.6 2000/11/24 23:13:01 guus Exp $ */ #include "config.h" @@ -71,11 +71,8 @@ void init_connections(void) connection_t *new_connection(void) { - connection_t *p = (connection_t *)xmalloc(sizeof(*p)); + connection_t *p = (connection_t *)xmalloc_and_zero(sizeof(*p)); cp - /* initialise all those stupid pointers at once */ - memset(p, '\0', sizeof(*p)); - p->subnet_tree = new_rbltree((rbl_compare_t)subnet_compare, NULL); cp return p; @@ -160,7 +157,7 @@ cp connection_t *lookup_connection(ipv4_t address, short unsigned int port) { - connection_t cl, *p; + connection_t cl; cp cl.address = address; cl.port = port;