Assign more suitable types and fix narrowing conversion warns.
[tinc] / src / raw_socket_device.c
index 30f8b3c..4dd18e2 100644 (file)
@@ -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,