From patchwork Tue Jun 4 21:17:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3718 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:280d:b0:57d:b2cb:6cf with SMTP id r13csp67962mas; Tue, 4 Jun 2024 14:17:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCViIX2f85d8Udt2nkUFTcmCKweqJ1jWnp7ZstZza1uV7qyZgwwVKy/Qy5H0ya4+PWOAOAAbefyiY+tXDsduLqwsabIMA7Q= X-Google-Smtp-Source: AGHT+IGmhCk9abPpfDYDG81OhAUoGKjyFtn5kRC3X5phhbzSATK78Y48oF7g9Xa6vZ/++ebFX6ed X-Received: by 2002:a05:6a00:3d47:b0:6ec:ee44:17bb with SMTP id d2e1a72fcca58-703e59ef15emr718260b3a.2.1717535872350; Tue, 04 Jun 2024 14:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717535872; cv=none; d=google.com; s=arc-20160816; b=vYr6LzzndYAOivK8pdhQMd++qi1W/V5cna5MTJakkJAWDCxZAJbBNHMyznksTNqZsp wIrqDm47ghw+ggK4Bx0iHj2XumfMK9j7EsG+zNM6fvCTfwICEizOnKwpWiY25Ajgo10k HyRPpl0wm7e3dBgCf8h9BVFprQzLBqJNDOyeLXvOtOsPMGe21kv+WNDPWsAFL1W/oEzi htQ+iGx8qfK1Z1820q1wEM+EooCVNI1L1qLNg5/kjpMyPoKeqr7uIOR642F1h9IjAjxX QFPqh3FYiF2898dEv8MFZYHw4bNjza494S74do72jJe32M4PVxxinsSfudE6JGgvoDLx qOhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=NEMlBO/+wDGfjw2oYBs5xEj5GA+0CzX5xWaGnhpOZBM=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=ifDyIqsaMUTz1ikt1UVgMZGZZCuIQT9VBQs8tSLgM8ZARepaiPRbxU1qCSbBo9HEFm FemOJIKjysA/uI059U5goI2wKSox+SFjhzd+LB+16EdAUS/FcHupq3Fj3CgtAYUGUX3u bNExEqcFP7O+VnaqqEFPcAaHhLeOIkcHdphLcUFrGY/5GtejTqsFs0KS9NXrEY3PwUmY k7enPe+rAWNTQSgw8AfxZsi/LBpgDvlXVBrqfqpe3yA/iuSXvKtU8fTSrIZnsS80wZ+v 5w//Vwt4GRPAX5NUm4Ti343+Go7ogBRL7Quvjft3cE8pp7sIcR+CZ8G3WVvAbO2zmCqU pQxA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lb9K7M9v; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=IACnNTZS; 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 41be03b00d2f7-6c35c181423si1365380a12.629.2024.06.04.14.17.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2024 14:17:52 -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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lb9K7M9v; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=IACnNTZS; 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 [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 1sEbX5-0000wO-0Q; Tue, 04 Jun 2024 21:17:27 +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 1sEbX2-0000w2-Bp for openvpn-devel@lists.sourceforge.net; Tue, 04 Jun 2024 21:17:24 +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=QhyJBazMi4XE9dS5rWTNixRH0S6xvEe1qsnDgwdqgBk=; b=lb9K7M9vc59RWD/Hj2GG2VLfmR nVd1r7mfvxZ7zwNdOI6g7QfUseUM9OJ+4NVsx8ssh55PgguR3mAgCXfk1z9QNpbQIlyKARK0mRKM9 qwZtwjQK5chz2FOtFEwHpECKjIpqOgJ0qWVGRfUYCqqV1muKSswJBgQv9uAWdqFf9bOU=; 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=QhyJBazMi4XE9dS5rWTNixRH0S6xvEe1qsnDgwdqgBk=; b=IACnNTZS45tiiiBZnGE58i0jIk 6l8Skh9oqTbWdYEFNXaCdccVqRAsM+7y9gfUSQi3eq8VQHWrLe+L/5xIsIOg9oLZQtzTENeZ3SPWa QzHj64BaHHXKFL+f5TFaXqQyjyU3jW1gLYsd1GI8RL/0vr4JT/zRlRO6HjDn9g389S6o=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] 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 1sEbX1-0005ro-8R for openvpn-devel@lists.sourceforge.net; Tue, 04 Jun 2024 21:17:24 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 454LHA49032362 for ; Tue, 4 Jun 2024 23:17:10 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 454LHAc1032361 for openvpn-devel@lists.sourceforge.net; Tue, 4 Jun 2024 23:17:10 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 4 Jun 2024 23:17:08 +0200 Message-ID: <20240604211708.32315-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.44.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", 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 Instead of lzo_{free, malloc} we can just use the free and malloc as the lzoutils.h header itself suggests. Change-Id: I32ee28fde5d38d736f753c782d88a81de7fe2980 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: cmake.in] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [193.149.48.174 listed in sa-accredit.habeas.com] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [193.149.48.174 listed in bl.score.senderscore.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1sEbX1-0005ro-8R Subject: [Openvpn-devel] [PATCH v2] LZO: do not use lzoutils.h macros 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?1800966894785478641?= X-GMAIL-MSGID: =?utf-8?q?1800966894785478641?= From: Frank Lichtenheld Instead of lzo_{free,malloc} we can just use the free and malloc as the lzoutils.h header itself suggests. Change-Id: I32ee28fde5d38d736f753c782d88a81de7fe2980 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- 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/+/642 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/config.h.cmake.in b/config.h.cmake.in index 2cdfdcc..effca2a 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -184,9 +184,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_LZO1X_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_LZOUTIL_H 1 - /* Define to 1 if you have the `mlockall' function. */ #cmakedefine HAVE_MLOCKALL diff --git a/configure.ac b/configure.ac index d39cf7d..7f0105b 100644 --- a/configure.ac +++ b/configure.ac @@ -1174,15 +1174,6 @@ saved_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} ${LZO_CFLAGS}" AC_CHECK_HEADERS( - [lzo/lzoutil.h], - , - [AC_CHECK_HEADERS( - [lzoutil.h], - , - [AC_MSG_ERROR([lzoutil.h is missing])] - )] - ) - AC_CHECK_HEADERS( [lzo/lzo1x.h], , [AC_CHECK_HEADERS( diff --git a/src/openvpn/lzo.c b/src/openvpn/lzo.c index b313284..bab2d78 100644 --- a/src/openvpn/lzo.c +++ b/src/openvpn/lzo.c @@ -107,14 +107,14 @@ { msg(M_FATAL, "Cannot initialize LZO compression library (lzo_init() returns %d)", lzo_status); } - compctx->wu.lzo.wmem = (lzo_voidp) lzo_malloc(compctx->wu.lzo.wmem_size); + compctx->wu.lzo.wmem = (lzo_voidp) malloc(compctx->wu.lzo.wmem_size); check_malloc_return(compctx->wu.lzo.wmem); } static void lzo_compress_uninit(struct compress_context *compctx) { - lzo_free(compctx->wu.lzo.wmem); + free(compctx->wu.lzo.wmem); compctx->wu.lzo.wmem = NULL; } diff --git a/src/openvpn/lzo.h b/src/openvpn/lzo.h index e951b49..62d73a1 100644 --- a/src/openvpn/lzo.h +++ b/src/openvpn/lzo.h @@ -40,16 +40,11 @@ #if defined(HAVE_LZO_CONF_H) /* The lzo.h magic gets confused and still wants * to include lzo/lzoconf.h even if our include paths - * are setup to include the paths without lzo/ include lzoconf.h to - * avoid it being include by lzoutil.h */ + * are setup to include the paths without lzo/ + */ #include #include #endif -#if defined(HAVE_LZO_LZOUTIL_H) -#include -#elif defined(HAVE_LZOUTIL_H) -#include -#endif #if defined(HAVE_LZO_LZO1X_H) #include #elif defined(HAVE_LZO1X_H)