Replace asprintf()s not covered by the merge to xasprintf().
[tinc] / src / net.c
index b811754..cb6ed49 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -1,7 +1,7 @@
 /*
     net.c -- most of the network code
     Copyright (C) 1998-2005 Ivo Timmermans,
-                  2000-2006 Guus Sliepen <guus@tinc-vpn.org>
+                  2000-2009 Guus Sliepen <guus@tinc-vpn.org>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -203,7 +203,7 @@ static void timeout_handler(int fd, short events, void *event) {
 void handle_meta_connection_data(int fd, short events, void *data) {
        connection_t *c = data;
        int result;
-       socklen_t len = sizeof(result);
+       socklen_t len = sizeof result;
 
        if(c->status.connecting) {
                c->status.connecting = false;
@@ -270,7 +270,7 @@ int reload_configuration(void) {
                        c->outgoing = NULL;
                }
                
-               asprintf(&fname, "%s/hosts/%s", confbase, c->name);
+               xasprintf(&fname, "%s/hosts/%s", confbase, c->name);
                if(stat(fname, &s) || s.st_mtime > last_config_check)
                        terminate_connection(c, c->status.active);
                free(fname);