]> tinc-vpn.org Git - tinc/blobdiff - src/bsd/device.c
Assign more suitable types and fix narrowing conversion warns.
[tinc] / src / bsd / device.c
index db506e5a17074342c5b52b66e91a50b57336a427..57029d5d7e0f6b387478146384f6bf2b3f8fdb51 100644 (file)
@@ -85,7 +85,7 @@ static bool setup_utun(void) {
                return false;
        }
 
-       int unit = -1;
+       long unit = -1;
        char *p = strstr(device, "utun"), *e = NULL;
 
        if(p) {
@@ -351,7 +351,7 @@ static void close_device(void) {
 }
 
 static bool read_packet(vpn_packet_t *packet) {
-       int inlen;
+       ssize_t inlen;
 
        switch(device_type) {
        case DEVICE_TYPE_TUN: