]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Do not use deprecated aliases on Windows
authorFrank Lichtenheld <frank@lichtenheld.com>
Wed, 13 May 2026 15:08:32 +0000 (17:08 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 14 May 2026 10:27:27 +0000 (12:27 +0200)
Both these work perfectly fine but are discouraged
and might cause warnings by compilers.

Identified by cppcheck.

Change-Id: I04e35928244e6ecda8c58285a812516662b50742
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Heiko Hund <heiko@openvpn.net>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1673
Message-Id: <20260513150838.27382-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36909.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/cryptoapi.c
src/openvpnmsica/openvpnmsica.c

index e17936a96c87ada1cfee65346755dab4b91233b5..bf80bbd01c9a804d37323ec0bf2402d1bc2acf0f 100644 (file)
@@ -235,7 +235,7 @@ test_certificate_template(const char *cert_prop, const CERT_CONTEXT *cert_ctx)
         if (pvext && cbext >= sizeof(CERT_TEMPLATE_EXT))
         {
             const CERT_TEMPLATE_EXT *cte = (const CERT_TEMPLATE_EXT *)pvext;
-            if (!stricmp(cert_prop, cte->pszObjId))
+            if (!_stricmp(cert_prop, cte->pszObjId))
             {
                 /* found direct OID match with certificate property specified */
                 gc_free(&gc);
@@ -244,7 +244,7 @@ test_certificate_template(const char *cert_prop, const CERT_CONTEXT *cert_ctx)
 
             const CRYPT_OID_INFO *tmpl_oid =
                 find_oid(CRYPT_OID_INFO_NAME_KEY, tmpl_name, CRYPT_TEMPLATE_OID_GROUP_ID);
-            if (tmpl_oid && !stricmp(tmpl_oid->pszOID, cte->pszObjId))
+            if (tmpl_oid && !_stricmp(tmpl_oid->pszOID, cte->pszObjId))
             {
                 /* found OID match in extension against resolved key */
                 gc_free(&gc);
index fdb610ca76bd9966804b8704aac05807afb2b156..9d12963e0eb901ace99ed95aa711795c58bc8258 100644 (file)
@@ -508,7 +508,7 @@ schedule_adapter_create(_Inout_ struct msica_arg_seq *seq,
             *iTicks += MSICA_ADAPTER_TICK_SIZE;
             break;
         }
-        else if (wcsicmp(szDisplayName, pAdapterOther->szName) == 0)
+        else if (_wcsicmp(szDisplayName, pAdapterOther->szName) == 0)
         {
             /* Adapter with a same name found. */
             for (LPCWSTR hwid = pAdapterOther->szzHardwareIDs;; hwid += wcslen(hwid) + 1)
@@ -521,7 +521,7 @@ schedule_adapter_create(_Inout_ struct msica_arg_seq *seq,
                     dwResult = ERROR_ALREADY_EXISTS;
                     goto cleanup_pAdapterList;
                 }
-                else if (wcsicmp(hwid, szHardwareId) == 0)
+                else if (_wcsicmp(hwid, szHardwareId) == 0)
                 {
                     /* This is an adapter with the requested hardware ID. We already have what we
                      * want! */
@@ -583,7 +583,7 @@ schedule_adapter_delete(_Inout_ struct msica_arg_seq *seq,
     for (struct tap_adapter_node *pAdapter = pAdapterList; pAdapter != NULL;
          pAdapter = pAdapter->pNext)
     {
-        if (wcsicmp(szDisplayName, pAdapter->szName) == 0)
+        if (_wcsicmp(szDisplayName, pAdapter->szName) == 0)
         {
             /* Adapter found. */
             WCHAR szArgument[8 /*disable=|enable=|delete=*/
@@ -1084,7 +1084,7 @@ ProcessDeferredAction(_In_ MSIHANDLE hInstall)
                 for (struct tap_adapter_node *pAdapter = pAdapterList; pAdapter != NULL;
                      pAdapter = pAdapter->pNext)
                 {
-                    if (wcsicmp(szName, pAdapter->szName) == 0)
+                    if (_wcsicmp(szName, pAdapter->szName) == 0)
                     {
                         /* Adapter found. */
                         dwResult = tap_delete_adapter(NULL, &pAdapter->guid, &bRebootRequired);