libsystemd: 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-31 18:30:40 +02:00
parent da69848791
commit b50d7345a2
17 changed files with 35 additions and 1 deletions
@@ -783,6 +783,8 @@ int device_monitor_send(
static void bpf_stmt(struct sock_filter *ins, unsigned *i,
unsigned short code, unsigned data) {
assert(i);
ins[(*i)++] = (struct sock_filter) {
.code = code,
.k = data,
@@ -792,6 +794,8 @@ static void bpf_stmt(struct sock_filter *ins, unsigned *i,
static void bpf_jmp(struct sock_filter *ins, unsigned *i,
unsigned short code, unsigned data,
unsigned short jt, unsigned short jf) {
assert(i);
ins[(*i)++] = (struct sock_filter) {
.code = code,
.jt = jt,