]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Update catalog.c - Removing sanity check as there is no need of checking non null...
authorSidhuRupinder <158014905+SidhuRupinder@users.noreply.github.com>
Thu, 7 Mar 2024 01:31:59 +0000 (07:01 +0530)
committerGitHub <noreply@github.com>
Thu, 7 Mar 2024 01:31:59 +0000 (10:31 +0900)
There is no need to check the pointer as the pointer will never be NULL.

Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
src/libsystemd/sd-journal/catalog.c

index cb5006077202607d7b8ab322e37b8cfed3b67ca7..826d67371aac27d569e55ce3231b020c75642a12 100644 (file)
@@ -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;
 }