]> git.meshlink.io Git - meshlink/commitdiff
Fix return value type of vde_send().
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 25 Mar 2012 13:00:21 +0000 (14:00 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 25 Mar 2012 13:00:21 +0000 (14:00 +0100)
The libvdeplug_dyn.h header file incorrectly declares the return type of
vde_send() to size_t, while in reality it is ssize_t.

src/vde_device.c

index 258945edb37b628959d8346d75bda908eaab587d..1f1d8cf8c9861d99ef16c3ec9031e2b11755b724 100644 (file)
@@ -114,7 +114,7 @@ static bool read_packet(vpn_packet_t *packet) {
 }
 
 static bool write_packet(vpn_packet_t *packet) {
-       if(plug.vde_send(conn, packet->data, packet->len, 0) < 0) {
+       if((ssize_t)plug.vde_send(conn, packet->data, packet->len, 0) < 0) {
                if(errno != EINTR && errno != EAGAIN) {
                        logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, strerror(errno));
                        running = false;