X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fbsd%2Fdevice.c;h=35038c74d16f2b0df3a109550c85b624095d8ce4;hb=636200d1a2024982fe5b3062153daa72a8253015;hp=70f4757fedbf5669e1b75c834df1072bc4ab06cd;hpb=a9bdfb424e7a469d15156aa44bbe2fd0b8e28531;p=tinc diff --git a/src/bsd/device.c b/src/bsd/device.c index 70f4757f..35038c74 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -175,7 +175,7 @@ bool read_packet(vpn_packet_t *packet) { case DEVICE_TYPE_TUNIFHEAD: { u_int32_t type; - struct iovec vector[2] = {{&type, sizeof(type)}, {packet->data + 14, MTU - 14}}; + struct iovec vector[2] = {{&type, sizeof type}, {packet->data + 14, MTU - 14}}; if((inlen = readv(device_fd, vector, 2)) <= 0) { logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, @@ -244,7 +244,7 @@ bool write_packet(vpn_packet_t *packet) { case DEVICE_TYPE_TUNIFHEAD: { u_int32_t type; - struct iovec vector[2] = {{&type, sizeof(type)}, {packet->data + 14, packet->len - 14}}; + struct iovec vector[2] = {{&type, sizeof type}, {packet->data + 14, packet->len - 14}}; int af; af = (packet->data[12] << 8) + packet->data[13];