From: "its_Giaan (Code Review)" Date: Thu, 6 Jun 2024 11:33:32 +0000 In-Reply-To: References: Reply-To: gianmarco@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., gert@...1296... Message-ID: <050c338cedb5dc1fe2241105197357b87cd6d807-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="0pzhgeujTdg="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: LZO: do not use lzoutils.h macros List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: cron2 , flichtenheld , plaisthos Cc: openvpn-devel --0pzhgeujTdg= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: cron2, flichtenheld, plaisthos. its_Giaan has uploaded a new patch set (#3) to the change originally create= d by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/642?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by plaisthos Change subject: LZO: do not use lzoutils.h macros ...................................................................... LZO: do not use lzoutils.h macros 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 Message-Id: <20240604211708.32315-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28= 705.html Signed-off-by: Gert Doering --- M config.h.cmake.in M configure.ac M src/openvpn/lzo.c M src/openvpn/lzo.h 4 files changed, 4 insertions(+), 21 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/642/3 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 965ed1a..2e5ab6a 100644 --- a/configure.ac +++ b/configure.ac @@ -1161,15 +1161,6 @@ saved_CFLAGS=3D"${CFLAGS}" CFLAGS=3D"${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 =3D (lzo_voidp) lzo_malloc(compctx->wu.lzo.wmem_s= ize); + compctx->wu.lzo.wmem =3D (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 =3D 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) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/642?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I32ee28fde5d38d736f753c782d88a81de7fe2980 Gerrit-Change-Number: 642 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: cron2 Gerrit-Attention: flichtenheld Gerrit-MessageType: newpatchset --0pzhgeujTdg= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: cron2, flichtenheld, plaisthos. <= /p>

its_Giaan uploaded patch set #3 to the change originall= y created by flichtenheld.

View Change

The following approvals got o= utdated and were removed: Code-Review+2 by plaisthos

LZO: do not use lzoutils.h macros

Instead= of lzo_{free,malloc} we can just use the
free and malloc as the lzoutil= s.h header itself
suggests.

Change-Id: I32ee28fde5d38d736f753c782= d88a81de7fe2980
Signed-off-by: Frank Lichtenheld <frank@...2641...>= ;
Acked-by: Arne Schwabe <arne-openvpn@...1227...>
Message-Id: = <20240604211708.32315-1-gert@...1296...>
URL: https://www.mail-arc= hive.com/openvpn-devel@lists.sourceforge.net/msg28705.html
Signed-off-by= : Gert Doering <gert@...1296...>
---
M config.h.cmake.in
M c= onfigure.ac
M src/openvpn/lzo.c
M src/openvpn/lzo.h
4 files change= d, 4 insertions(+), 21 deletions(-)

git pull ssh://gerrit.openvpn=
.net:29418/openvpn refs/changes/42/642/3
diff --git a/config.h.cmak=
e.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 <lzo1x.h> header file. */
#define HAVE_LZO= 1X_H 1

-#define HAVE_LZOUTIL_H 1
-
/* Defin= e to 1 if you have the `mlockall' function. */
#cmaked= efine HAVE_MLOCKALL

diff --git a/configur= e.ac b/configure.ac
index 965ed1a..2e5ab6a 100644--- a/configure.ac
+++ b/configure.ac
@@ -1161,15 +1161,6 @@

saved_CFLAGS=3D"${CFLAGS}&q= uot;
CFLAGS=3D"${CFLAGS} ${LZO_CFLAGS}"<= br> AC_CHECK_HEADERS(
- [lzo/lzoutil.h],
- ,
- [AC_CHECK_HE= ADERS(
- [lzoutil.h],=
- ,
- [AC_MSG_ERROR([lzoutil.h is missing= ])]
- )]
- )

- AC_CHECK_HEADERS(
[lzo/lzo1x.h],
,
[AC_CHECK_HEADERS(
d= iff --git a/src/openvpn/lzo.c b/src/openvpn/lzo.c
index b31= 3284..bab2d78 100644
--- a/src/openvpn/lzo.c
+++ b/src/openvpn/lzo.c

@@ -107,14 +107,14 @@
<= span> {
msg(M_FATAL, "Cannot initialize L= ZO compression library (lzo_init() returns %d)", lzo_status); }
- com= pctx->wu.lzo.wmem =3D (lzo_voidp) lzo_malloc(compctx->wu.lzo.wmem_siz= e);
+ compctx->= wu.lzo.wmem =3D (lzo_voidp) malloc(compctx->wu.lzo.wmem_size); check_malloc_return(compctx->wu.lzo.wmem);
= }

static void
lzo_compr= ess_uninit(struct compress_context *compctx)
{
<= span style=3D"color: hsl(0, 100%, 40%);">- lzo_free(compctx->wu.lzo.w= mem);
+ free(compc= tx->wu.lzo.wmem);
compctx->wu.lzo.wmem =3D NULL;=
}

diff --git a/src/open= vpn/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 wa= nts
* to include lzo/lzoconf.h even if our include paths<= /span>
- * are setup to includ= e the paths without lzo/ include lzoconf.h to
- * avoid it being include by lzoutil.h */+ * are setup to include the p= aths without lzo/
+ *= /
#include <lzodefs.h>
#include <= ;lzoconf.h>
#endif
-#if defined(HAVE_LZO_LZOUTIL_H)
-#include <lzo/lzoutil.h>
-#elif defined(HAVE_LZOUTIL_H)-#include <lzoutil.h>
-#endif
#i= f defined(HAVE_LZO_LZO1X_H)
#include <lzo/lzo1x.h>
#elif defined(HAVE_LZO1X_H)

To view, visit change 642. To unsubscribe, or for help writing mail filters= , visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I32ee28fde5d38d736f753c782d8= 8a81de7fe2980
Gerrit-Change-Number: 642
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: cron2 <gert@...1296...>= ;
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newpatchset
--0pzhgeujTdg=--