From: SidhuRupinder <158014905+SidhuRupinder@users.noreply.github.com> Date: Thu, 7 Mar 2024 01:31:59 +0000 (+0530) Subject: Update catalog.c - Removing sanity check as there is no need of checking non null... X-Git-Tag: v256-rc1~613 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=6ad20da18a81758a34e70646d8602a8cd7c95000;p=systemd%2F.git 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 --- diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c index cb50060772..826d67371a 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; }