journal: make check-pointer-deref clean

Add the needed assert changes to make the code clean
for the new check-pointer-deref script.
This commit is contained in:
Michael Vogt
2026-03-30 13:36:00 +02:00
parent f3c49a597f
commit 1626130254
4 changed files with 10 additions and 1 deletions
-1
View File
@@ -2979,7 +2979,6 @@ if spatch.found()
coccinelle_exclude = [
'src/basic/',
'src/core/',
'src/journal/',
'src/libsystemd/',
'src/network/',
'src/shared/',
+2
View File
@@ -158,6 +158,8 @@ static int map_generic_field(
char *c, *t;
int r;
assert(p);
/* Implements fallback mappings for all fields we don't know */
for (e = *p; e < *p + 16; e++) {
+2
View File
@@ -135,6 +135,8 @@ static int manager_determine_path_usage(
}
static void cache_space_invalidate(JournalStorageSpace *space) {
assert(space);
zero(*space);
}
+6
View File
@@ -45,6 +45,10 @@ static void manager_process_entry_meta(
char **message,
pid_t *object_pid) {
assert(priority);
assert(identifier);
assert(message);
/* We need to determine the priority of this entry for the rate limiting logic */
if (l == 10 &&
@@ -113,6 +117,8 @@ static int manager_process_entry(
const char *p;
int r = 1;
assert(remaining);
p = buffer;
while (*remaining > 0) {