rpm/backport-Fix-pointer-bogosity-in-rpmlog-callback.patch
gengqihu f189a4944a Backport some patches from upstream
(cherry picked from commit dc2d4dc8f6325495fda6b2b2565b76b5b8d9a0fe)
2024-07-24 11:45:25 +08:00

32 lines
1.0 KiB
Diff

From f8a72afbdb560dc534ca1ff390bc54e01d1144a6 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 8 Apr 2024 14:41:48 +0300
Subject: [PATCH] Fix pointer bogosity in rpmlog callback
Conflict:NA
Reference:https://github.com/rpm-software-management/rpm/commit/f8a72afbdb560dc534ca1ff390bc54e01d1144a6
rpmlogCallbackData is already a pointer type, we don't want a pointer
to a pointer for this. Kinda surprising it actually worked, but then
it's just a void pointer so...
---
rpmio/rpmlog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpmio/rpmlog.c b/rpmio/rpmlog.c
index 2bb5ab0e3..3ccbe2692 100644
--- a/rpmio/rpmlog.c
+++ b/rpmio/rpmlog.c
@@ -382,7 +382,7 @@ static void dolog(struct rpmlogRec_s *rec, int saverec)
int cbrc = RPMLOG_DEFAULT;
int needexit = 0;
FILE *clog = NULL;
- rpmlogCallbackData *cbdata = NULL;
+ rpmlogCallbackData cbdata = NULL;
rpmlogCallback cbfunc = NULL;
rpmlogCtx ctx = rpmlogCtxAcquire(saverec);
--
2.33.0