From patchwork Mon Nov 12 01:22:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Rozman X-Patchwork-Id: 604 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.27.255.59]) by backend30.mail.ord1d.rsapps.net with LMTP id 2FpcAh5x6VuDIgAAIUCqbw for ; Mon, 12 Nov 2018 07:25:02 -0500 Received: from proxy15.mail.iad3a.rsapps.net ([172.27.255.59]) by director8.mail.ord1d.rsapps.net with LMTP id MBaNOx1x6Vs3XQAAfY0hYg ; Mon, 12 Nov 2018 07:25:02 -0500 Received: from smtp3.gate.iad3a ([172.27.255.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy15.mail.iad3a.rsapps.net with LMTP id WI9zNh1x6VtOTQAAHi9b9g ; Mon, 12 Nov 2018 07:25:01 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp3.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=rozman.si; dmarc=fail (p=none; dis=none) header.from=rozman.si X-Suspicious-Flag: YES X-Classification-ID: f9605dca-e675-11e8-b837-525400af4d07-1-1 Received: from [216.105.38.7] ([216.105.38.7:22000] helo=lists.sourceforge.net) by smtp3.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id B0/37-30429-D1179EB5; Mon, 12 Nov 2018 07:25:01 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1gMBFh-0002PI-JL; Mon, 12 Nov 2018 12:23:37 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gMBFg-0002PB-HZ for openvpn-devel@lists.sourceforge.net; Mon, 12 Nov 2018 12:23:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TQnYOpyEsITJw9nPwpKW4DIwEWUBYTEXb/Q0ekhc6Fo=; b=Slq2I07r3aGYuTPjLx+btv/Ule eMkJyhK+sCpwigrC9dR3y1UFtZ6yD+T2+Ur8NdZSHGwFSwRZUr5XCrLOQEwASx8JWEJWGRZvjrptX Yy11B5k7EpArbQYVaAwg1JGui3WDjiiWO3CBTFxy08OAc/CCij0tOmaWs3rt8TOEuRcI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=TQnYOpyEsITJw9nPwpKW4DIwEWUBYTEXb/Q0ekhc6Fo=; b=mSQ8vIDR6crukwh/WI9mPv3wa+ wIsvUtVf0q9RMLS0zPzOE8GwD07OmHo6r7GBuvnCbP8kQVyDMhXlizYNWi56X4khNmkFngOySqPGi zijUkB3HxeGywzHsT3bz2WtbtPJNRiDXY5g6q9PevitE0miiS9cMzYOWtgkgSpsB92po=; Received: from pub5.amebis.si ([213.250.55.21]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1gMBFN-00EywG-Pa for openvpn-devel@lists.sourceforge.net; Mon, 12 Nov 2018 12:23:36 +0000 Received: from SR6.amebis.doma (unknown [IPv6:2a00:ee2:209:164:8cd9:ee93:28f1:f852]) by pub5.amebis.si (Postfix) with ESMTP id DA197203C3; Mon, 12 Nov 2018 13:23:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rozman.si; s=default; t=1542025387; bh=khpTqwIwHe8eOHBgzjIyQrght7zzNZxmuK2wA/VZOlA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SgZMPjnNlNYda7jD3aSvOyo/xPqyxH0YXpmxHVgrQUJ0eozDr0rnNHd4ZnEIq+G9n Y/Q/suslmXzpVA1m4ZYydedNKQ/fR4QsHp3/OvVuub+X8AgyEUAzwVLuUn63tYQWBm T7vuRz4tFyMH0WWcNpopsYwMsez+JXL6bKSSpX/4= From: Simon Rozman To: openvpn-devel@lists.sourceforge.net Date: Mon, 12 Nov 2018 13:22:45 +0100 Message-Id: <20181112122246.13556-2-simon@rozman.si> X-Mailer: git-send-email 2.19.1.windows.1 In-Reply-To: <20181112122246.13556-1-simon@rozman.si> References: <20181112122246.13556-1-simon@rozman.si> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 TIME_LIMIT_EXCEEDED Exceeded time limit / deadline X-Headers-End: 1gMBFN-00EywG-Pa Subject: [Openvpn-devel] [PATCH 2/3] Change C++ to C comments X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox --- src/openvpnmsica/openvpnmsica.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Acked-by: Gert Doering diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c index d1642d6a..99b47bf0 100644 --- a/src/openvpnmsica/openvpnmsica.c +++ b/src/openvpnmsica/openvpnmsica.c @@ -162,7 +162,7 @@ FindSystemInfo(_In_ MSIHANDLE hInstall) struct openvpnmsica_tls_data *s = (struct openvpnmsica_tls_data *)TlsGetValue(openvpnmsica_tlsidx_session); s->hInstall = hInstall; - // Get Windows version. + /* Get Windows version. */ OSVERSIONINFOEX ver_info = { .dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX) }; if (!GetVersionEx((LPOSVERSIONINFO)&ver_info)) { uiResult = GetLastError(); @@ -170,7 +170,7 @@ FindSystemInfo(_In_ MSIHANDLE hInstall) goto cleanup_CoInitialize; } - // The Windows version is usually spoofed, check using RtlGetVersion(). + /* The Windows version is usually spoofed, check using RtlGetVersion(). */ TCHAR szDllPath[0x1000]; ExpandEnvironmentStrings(TEXT("%SystemRoot%\\System32\\ntdll.dll"), szDllPath, #ifdef UNICODE @@ -193,7 +193,7 @@ FindSystemInfo(_In_ MSIHANDLE hInstall) rtl_ver_info.dwMajorVersion == ver_info.dwMajorVersion && rtl_ver_info.dwMinorVersion > ver_info.dwMinorVersion || rtl_ver_info.dwMajorVersion == ver_info.dwMajorVersion && rtl_ver_info.dwMinorVersion == ver_info.dwMinorVersion && rtl_ver_info.dwBuildNumber > ver_info.dwBuildNumber) { - // We got RtlGetVersion() and it reported newer version than GetVersionEx(). + /* We got RtlGetVersion() and it reported newer version than GetVersionEx(). */ ver_info.dwMajorVersion = rtl_ver_info.dwMajorVersion; ver_info.dwMinorVersion = rtl_ver_info.dwMinorVersion; ver_info.dwBuildNumber = rtl_ver_info.dwBuildNumber; @@ -204,7 +204,7 @@ FindSystemInfo(_In_ MSIHANDLE hInstall) FreeLibrary(hNtDllModule); } - // We don't trust RtlGetVersion() either. Check the version resource of kernel32.dll. + /* We don't trust RtlGetVersion() either. Check the version resource of kernel32.dll. */ ExpandEnvironmentStrings(TEXT("%SystemRoot%\\System32\\kernel32.dll"), szDllPath, #ifdef UNICODE _countof(szDllPath) @@ -220,10 +220,10 @@ FindSystemInfo(_In_ MSIHANDLE hInstall) LPVOID pVersionInfo = malloc(dwVerInfoSize); if (pVersionInfo) { - // Read version info. + /* Read version info. */ if (GetFileVersionInfo(szDllPath, dwHandle, dwVerInfoSize, pVersionInfo)) { - // Get the value for the root block. + /* Get the value for the root block. */ UINT uiSize = 0; VS_FIXEDFILEINFO *pVSFixedFileInfo = NULL; if (VerQueryValue(pVersionInfo, TEXT("\\"), &pVSFixedFileInfo, &uiSize) && uiSize && pVSFixedFileInfo) @@ -231,7 +231,7 @@ FindSystemInfo(_In_ MSIHANDLE hInstall) HIWORD(pVSFixedFileInfo->dwProductVersionMS) == ver_info.dwMajorVersion && LOWORD(pVSFixedFileInfo->dwProductVersionMS) > ver_info.dwMinorVersion || HIWORD(pVSFixedFileInfo->dwProductVersionMS) == ver_info.dwMajorVersion && LOWORD(pVSFixedFileInfo->dwProductVersionMS) == ver_info.dwMinorVersion && HIWORD(pVSFixedFileInfo->dwProductVersionLS) > ver_info.dwBuildNumber) { - // We got kernel32.dll version and it is newer. + /* We got kernel32.dll version and it is newer. */ ver_info.dwMajorVersion = HIWORD(pVSFixedFileInfo->dwProductVersionMS); ver_info.dwMinorVersion = LOWORD(pVSFixedFileInfo->dwProductVersionMS); ver_info.dwBuildNumber = HIWORD(pVSFixedFileInfo->dwProductVersionLS);