summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-journal
diff options
context:
space:
mode:
authorSidhuRupinder <158014905+SidhuRupinder@users.noreply.github.com>2024-03-07 02:31:59 +0100
committerGitHub <noreply@github.com>2024-03-07 02:31:59 +0100
commit6ad20da18a81758a34e70646d8602a8cd7c95000 (patch)
tree9288af42bf4841752f5d657e8e9858c897be2729 /src/libsystemd/sd-journal
parentMerge pull request #31616 from poettering/resolved-varlink-resolve-record (diff)
downloadsystemd-6ad20da18a81758a34e70646d8602a8cd7c95000.tar.xz
systemd-6ad20da18a81758a34e70646d8602a8cd7c95000.zip
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 <frantisek@sumsal.cz>
Diffstat (limited to 'src/libsystemd/sd-journal')
-rw-r--r--src/libsystemd/sd-journal/catalog.c3
1 files changed, 1 insertions, 2 deletions
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;
}