From patchwork Wed May 13 15:08:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4935 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:a719:b0:84a:48f:a1fd with SMTP id hl25csp3236883mab; Wed, 13 May 2026 08:09:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AFNElJ/4klQNPD1tVw4imFqd4uN5Nf8tMJKjjCZn6xDb5GFJ6XnFOSTldkOboxoiPMNubG4y/bVEUPHBQXc=@openvpn.net X-Received: by 2002:a05:6820:160f:b0:696:72c4:5d69 with SMTP id 006d021491bc7-69b78d87b4dmr2274376eaf.17.1778684945249; Wed, 13 May 2026 08:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778684945; cv=none; d=google.com; s=arc-20240605; b=TyCcRwtWy1bvPvXLFfYb7h3YVlAJOglNcd1A/X9qrbMt714axRiNIaezV/+K1T3Q/8 6seGMyIYxE14qkuW+Qj+rdRJvt5NxvF47tknuESgWLmtHiP/J6K8Ud8+cu9wYAyWWEoe bayFovDF3mMtpe8BtPEJIPZQhFsVyOn8rDLTbRWRm3vII23vSWW7aHQs/+3jF/4acB6W jrq9bY7jOrVZN+KvDDq4lxDpWclYKL93mgqm5lxpp2bYpX1ZvlNbJOxpJ6sFXQjB58ss mSlZfoHamn8CP2EA4NYhUR44QvQDFZUxRF9faO9J58rQ/9rqNJLICLYhUOJ/DLf+otkV vfyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=2USijEK1tK8s3LlqI4Z2m+htQlVaN2JPOq1+UJ3QYSg=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=SGtuGLOz/entESV9Aaplc8Ov8ixlIiATXs/l0tJQQ5aRm123lp/tk2nl/oeYl01LRa XpdtuzFqKpSV/5f+LR7WV50NC+o6ljoLB7dD3dW24X5WRrpur3+hPlqddy+H8IhT8lwA 8sMIz7FKTyHRbsv9xInRjR6iKMh8nPU1budoojHIhAt4ggm1MCwOOCFzVfYQxobXv4ho YuO4BluXiMVaJXwqW8juuOzI0OO3M3EyxQqrJoUiF3OL9pklpuN6JiK8n+RZG+eykppK dk37Y+WmmtTlp9vcipgwjWdXWSfnPbgpZpxjRKOEWMkoDDoVFKQfT628YVkHslFNH1qa lJmw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b="cwr/Gq3S"; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=BI32VwYj; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=QatKlBal; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 006d021491bc7-69b25dceccdsi8647831eaf.53.2026.05.13.08.09.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2026 08:09:05 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b="cwr/Gq3S"; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=BI32VwYj; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=QatKlBal; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2USijEK1tK8s3LlqI4Z2m+htQlVaN2JPOq1+UJ3QYSg=; b=cwr/Gq3SJ7tUI40QicKmpIyM2D +a7u7MDXvh27xjC/k26lBdnZgUCnN9lcSz8d4YUup2nOdqgRu7IssLtATP+YjD5glmesbPJzFrHPa YkvfdUWPJQaMgtdYpBsPeCRO9tkMm2DMFtKqyXAjSI8of0UXcqzjv0wjQXJ1nbUkVwFc=; 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.95) (envelope-from ) id 1wNBCi-0001YS-0O; Wed, 13 May 2026 15:08:56 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wNBCe-0001Y2-SM for openvpn-devel@lists.sourceforge.net; Wed, 13 May 2026 15:08:53 +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:To:From:Sender:Reply-To:Cc: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=gvf4GKPQkBb9t+xh+JGJakR3KM34XE9UQv2Hzkt1tuc=; b=BI32VwYjk2WXjv1F6FRmhLV7yC GSE/ngojiWG66GSOcEwKx9dgwemlfkciM1XxV1srU5xDhi5CG76l/qXOoiutLSZCdmNg6Xl8TvB+K ukIkpKK7lFP9zRdr9S9iSV0gVOoVJ/TiUFBTP4dWbCxHVYtPfbQ3O00mcnDJ9bBaFakE=; 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:To:From:Sender:Reply-To:Cc: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=gvf4GKPQkBb9t+xh+JGJakR3KM34XE9UQv2Hzkt1tuc=; b=QatKlBalfvhQrIwTIsBAnBlwT3 5axbG/+TQZu9vLFwcZCh6khJ84iNlxYyG/nQzHjD6zVCAs0AUlbGuHoHSEmY6MNXLCo5C4XGbBfKI YIHza7NQn5OYq9sciubnm8teO0dDOfjEKW/irqdAEy2grT/ZspMNVclmm4LzsZs79TmI=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wNBCc-0006kD-3c for openvpn-devel@lists.sourceforge.net; Wed, 13 May 2026 15:08:53 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 64DF8cYZ027425 for ; Wed, 13 May 2026 17:08:38 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 64DF8cfi027424 for openvpn-devel@lists.sourceforge.net; Wed, 13 May 2026 17:08:38 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Wed, 13 May 2026 17:08:32 +0200 Message-ID: <20260513150838.27382-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Frank Lichtenheld Both these work perfectly fine but are discouraged and might cause warnings by compilers. Identified by cppcheck. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1wNBCc-0006kD-3c Subject: [Openvpn-devel] [PATCH v2] Do not use deprecated aliases on Windows 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 X-GMAIL-THRID: =?utf-8?q?1865086345152108465?= X-GMAIL-MSGID: =?utf-8?q?1865086345152108465?= From: Frank Lichtenheld 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 Acked-by: Heiko Hund Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1673 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1673 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Heiko Hund diff --git a/src/openvpn/cryptoapi.c b/src/openvpn/cryptoapi.c index e17936a..bf80bbd 100644 --- a/src/openvpn/cryptoapi.c +++ b/src/openvpn/cryptoapi.c @@ -235,7 +235,7 @@ 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 @@ 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); diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c index d698c04..95e457c 100644 --- a/src/openvpnmsica/openvpnmsica.c +++ b/src/openvpnmsica/openvpnmsica.c @@ -508,7 +508,7 @@ *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 @@ 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 @@ 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=*/ @@ -1083,7 +1083,7 @@ 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);