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:
@@ -2979,7 +2979,6 @@ if spatch.found()
|
||||
coccinelle_exclude = [
|
||||
'src/basic/',
|
||||
'src/core/',
|
||||
'src/journal/',
|
||||
'src/libsystemd/',
|
||||
'src/network/',
|
||||
'src/shared/',
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -135,6 +135,8 @@ static int manager_determine_path_usage(
|
||||
}
|
||||
|
||||
static void cache_space_invalidate(JournalStorageSpace *space) {
|
||||
assert(space);
|
||||
|
||||
zero(*space);
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user