Replace pointers to global splay trees with structs.
[tinc] / src / raw_socket_device.c
index 30f8b3c..8463502 100644 (file)
@@ -37,11 +37,11 @@ static bool setup_device(void) {
        struct ifreq ifr;
        struct sockaddr_ll sa;
 
-       if(!get_config_string(lookup_config(config_tree, "Interface"), &iface)) {
+       if(!get_config_string(lookup_config(&config_tree, "Interface"), &iface)) {
                iface = xstrdup("eth0");
        }
 
-       if(!get_config_string(lookup_config(config_tree, "Device"), &device)) {
+       if(!get_config_string(lookup_config(&config_tree, "Device"), &device)) {
                device = xstrdup(iface);
        }
 
@@ -94,7 +94,7 @@ static void close_device(void) {
 }
 
 static bool read_packet(vpn_packet_t *packet) {
-       int inlen;
+       ssize_t inlen;
 
        if((inlen = read(device_fd, DATA(packet), MTU)) <= 0) {
                logger(DEBUG_ALWAYS, LOG_ERR, "Error while reading from %s %s: %s", device_info,