]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Fix Linux kernel coding style warning
authorDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sun, 18 Jul 2021 19:02:11 +0000 (21:02 +0200)
committerDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Mon, 19 Jul 2021 11:47:28 +0000 (13:47 +0200)
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

index 1d27bb7f0e760358e4970a4192ae5bbc2e2ad02e..b3113178dd28fa0f35228211877221c3df3acf23 100644 (file)
@@ -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());