From 7b007ac6858c546fe0df074302d20836e40141bc Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Sun, 18 Jul 2021 21:02:11 +0200 Subject: [PATCH] Fix Linux kernel coding style warning Fix a single SIZEOF_ADDRESS warning. While I haven't found official documentation for the TAP_IOCTL_GET_VERSION control code, clearly the DeviceIoControl() parameters were incorrect, see other online examples: https://github.com/juhovh/tapcfg/blob/3d5ef74/src/lib/tapcfg_windows.c#L140-L146 https://github.com/OpenVPN/openvpn/blob/34b4254/src/openvpn/tun.c#L6030-L6032 Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- tun-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tun-win32.c b/tun-win32.c index 1d27bb7f..b3113178 100644 --- a/tun-win32.c +++ b/tun-win32.c @@ -242,7 +242,7 @@ static intptr_t open_tuntap(struct openconnect_info *vpninfo, char *guid, wchar_ vpn_progress(vpninfo, PRG_DEBUG, _("Opened tun device %S\n"), wname); if (!DeviceIoControl(tun_fh, TAP_IOCTL_GET_VERSION, - data, sizeof(&data), data, sizeof(data), + data, sizeof(data), data, sizeof(data), &len, NULL)) { char *errstr = openconnect__win32_strerror(GetLastError()); -- 2.50.1