From 6ad20da18a81758a34e70646d8602a8cd7c95000 Mon Sep 17 00:00:00 2001 From: SidhuRupinder <158014905+SidhuRupinder@users.noreply.github.com> Date: Thu, 7 Mar 2024 07:01:59 +0530 Subject: [PATCH] Update catalog.c - Removing sanity check as there is no need of checking non null pointer (#31653) There is no need to check the pointer as the pointer will never be NULL. Co-authored-by: Frantisek Sumsal --- src/libsystemd/sd-journal/catalog.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c index cb500607720..826d67371aa 100644 --- a/src/libsystemd/sd-journal/catalog.c +++ b/src/libsystemd/sd-journal/catalog.c @@ -618,8 +618,7 @@ int catalog_get(const char* database, sd_id128_t id, char **_text) { r = 0; finish: - if (p) - munmap(p, st.st_size); + (void) munmap(p, st.st_size); return r; } -- 2.47.3