Fix compiler warnings.
[oweals/tinc.git] / src / control.c
index 220781518848adbcea16cd1b789e4a1abb661788..e3901a6da8e496a36c85f58eb67beb4f9a8c13dd 100644 (file)
@@ -28,9 +28,6 @@
 #include "utils.h"
 #include "xalloc.h"
 
-static int control_socket = -1;
-static struct event control_event;
-static splay_tree_t *control_socket_tree;
 char controlcookie[65];
 extern char *controlcookiename;
 
@@ -112,7 +109,7 @@ bool init_control() {
        }
 
 #ifdef HAVE_FCHMOD
-       fchmod(f, 0600);
+       fchmod(fileno(f), 0600);
 #else
        chmod(controlcookiename, 0600);
 #endif