From patchwork Tue Nov 24 14:23:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5781 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp4283049lad; Tue, 24 Nov 2026 06:24:06 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErGtusrOILejm1KvD5JsIj2JY5aYTsU3KvGr17uCxNskWZO9bI2a11FWMGuj7s8R7HpdZvS34PtLCRs=@openvpn.net X-Received: by 2002:a05:693c:8959:10b0:386:a603:506f with SMTP id 5a478bee46e88-386a60351eamr8620837eec.26.1795530246302; Tue, 24 Nov 2026 06:24:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795530246; cv=none; d=google.com; s=arc-20260327; b=m7RSllyPtb+GNDgki1KxxpiYHykqTzusYjVjlMu7nOJtkn2JyrSPIfgrWydBV2o39N /dmryPMETunoaxqmV///Ya3DuJMOJPSJWVsfg1HOkhR7wuz6OypSrHVBQrN2LeJI/TwP 5wAcAmineU53LhPGBtb8eB4zLn0Psu+flsvvP7YhpSTrSgnARRfgBe+Aqbah2hVGs0iD lpjwDLoiUUP/kAJkmXyy8RlDh004lVor7b1aBd2HHUeNbXO2J1ia6PO+gPE3DBa1h5lo EpAxkGJZrMcOTNmY5VxICfQBW5N0hb176SIgGkQXDRMshV6OLe+zDZxQKTYLBdmigcQ4 43Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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=Q/K/nlxmBs78vNv3SkflRxebTuGEXaaDI2v7bJjxxek=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=s/FclpbRMu9ditFCMcMe+NTS8da6T6epGshWfl714YVECxTzcsGUbfuyJQUtTSi5tu eXmYkO6qs6BjSV6QB0r0SmNl2ajLabPX41POBlKe4cwQ6UdLumcPvEZkE7Yj13VGUlHO vEBiCGJvw8ESdqytJuWXju/pbruztAbXmP18IkvhOYMVUK+hmWlUChFVbLnJmz+4FmKu ypsZ5QonruozrMt9vw0MAJSc1/AntdZkcRaSLxGBn2ZstrIKf4uEF9C5Z5qQGnK8DqGl l8AeoS8wSk1J/Yc2vdPFaKUEy6Vi9vNwpF+rL97PaNIydy+OPkcC1X9ZdUi5XKx9bOrb Ye3g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=YcNWjkp4; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=V3Ia5Vra; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=YwYareWf; 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 5a478bee46e88-38566adb8aesi55993151eec.15.2026.11.24.06.24.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2026 06:24:06 -0800 (PST) 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=YcNWjkp4; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=V3Ia5Vra; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=YwYareWf; 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-Unsubscribe-Post: List-Owner; bh=Q/K/nlxmBs78vNv3SkflRxebTuGEXaaDI2v7bJjxxek=; b=YcNWjkp4VdBsi6 RtK5jA2w3ZT6+eq5nwsG2fYxexzjqsJldg3/VySfVq73gHNXRABGSZf6w0S+gVRLPskS/Rz/iGarz Xw56+MVGUoJ5pvXO1nSXGsMZBwNwF01LuCu0Wzcw7mI25VcLM+G+Q5Ut20f2ZLAi/93d+6aA/fPtD 3lg=; 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.100.1) (envelope-from ) id 1xVrRF-000000007WO-0ilu; Tue, 24 Nov 2026 14:24:05 +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.100.1) (envelope-from ) id 1xVrRD-000000007WF-0rOr for openvpn-devel@lists.sourceforge.net; Tue, 24 Nov 2026 14:24:03 +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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Sc9Yc87jxZ8BZghHHLWsEzVOYyPhQQgs+i5NAB1wa3c=; b=V3Ia5VrayGr2tDp/3o0y4GKxac SgbSdrHPN5H/jddqTiC2GLZqrgyplSp/R1CaniteCZ1ENy/WdtNoFAVvV2q3NT4bcPinuX7A2Jb5G omUZruqiCX+l64YrsQa5fr5YekObu2QXiiO/pX2MgjAfH8xaXtMMbPCpfVHoe9CZb0os=; 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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Sc9Yc87jxZ8BZghHHLWsEzVOYyPhQQgs+i5NAB1wa3c=; b=YwYareWfO4dCNyThTBPYzVpd5L qZzbABix1Kucoq5NKMpqoX4WeMMC2u2BhOk6f5Ov8VKPrccA3VnaOR2GQ103vLEfiuNGWGXLG0f5D 296oduAeBDJZ6238JfXnpVIhRhpjlMTtPXnUliIk0/3j5pc9bdQR9MuICJAhy1B/mr6k=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xVrRA-000000003eJ-1WIW for openvpn-devel@lists.sourceforge.net; Tue, 24 Nov 2026 14:24:03 +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 6AOENrGC020260 for ; Tue, 24 Nov 2026 15:23:53 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AOENrVH020259 for openvpn-devel@lists.sourceforge.net; Tue, 24 Nov 2026 15:23:53 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 24 Nov 2026 15:23:46 +0100 Message-ID: <20261124142352.20244-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.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: Razvan Cojocaru hi->elem is set from b->list, which was just checked to be non-NULL. Change-Id: Icb913d6e890607c79a45a0e63e9a1ba44151e8e2 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/o [...] 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: 1xVrRA-000000003eJ-1WIW Subject: [Openvpn-devel] [PATCH v1] list: drop redundant check in hash_iterator_next() 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: 1882749923795210031 X-GMAIL-MSGID: 1882749923795210031 From: Razvan Cojocaru hi->elem is set from b->list, which was just checked to be non-NULL. Change-Id: Icb913d6e890607c79a45a0e63e9a1ba44151e8e2 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2337 --- 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/+/2337 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/list.c b/src/openvpn/list.c index dcd59d7..505be30 100644 --- a/src/openvpn/list.c +++ b/src/openvpn/list.c @@ -294,12 +294,9 @@ { hash_iterator_lock(hi, b); hi->elem = b->list; - if (hi->elem) - { - ret = hi->elem; - hash_iterator_advance(hi); - break; - } + ret = hi->elem; + hash_iterator_advance(hi); + break; } } }