# Remove directories from this list as they are cleaned up.
coccinelle_exclude = [
'src/basic/',
- 'src/core/',
'src/libsystemd/',
'src/shared/',
# libc/ has no assert() or systemd-headers so leave it
int r;
assert(u);
+ assert(set);
+ assert(set_installed);
set_clear(*set_installed);
r = set_ensure_allocated(set_installed, &bpf_program_hash_ops);
* - ret_kernel_value will contain the actual value presented by the kernel. */
assert(u);
+ assert(ret_unit_value);
+ assert(ret_kernel_value);
/* The root slice doesn't have any controller files, so we can't compare anything. */
if (unit_has_name(u, SPECIAL_ROOT_SLICE))
CGroupMask mask = 0;
int r;
+ assert(ret);
+
/* BPF-based firewall, device access control, and pinned foreign prog */
if (bpf_program_supported() > 0)
mask |= CGROUP_MASK_BPF_FIREWALL |
EmergencyAction x;
+ assert(ret);
+
x = emergency_action_from_string(value);
if (x < 0)
return -EINVAL;
int job_type_merge_and_collapse(JobType *a, JobType b, Unit *u) {
JobType t;
+ assert(a);
+
t = job_type_lookup_merge(*a, b);
if (t < 0)
return -EEXIST;
}
static int job_compare_id(Job * const *a, Job * const *b) {
+ assert(a);
+ assert(b);
+ assert(*a);
+ assert(*b);
+
return CMP((*a)->id, (*b)->id);
}
int parse_crash_chvt(const char *value, int *data) {
int b;
+ assert(data);
+
if (safe_atoi(value, data) >= 0)
return 0;
char *s;
int r;
+ assert(console);
+
r = value ? parse_boolean(value) : 1;
if (r == 0) {
*console = NULL;
const char *e;
char *z;
+ assert(path);
+
e = path_startswith(*path, "/var/run/");
if (!e)
return 0;
}
void manager_reloading_stopp(Manager **m) {
+ assert(m);
+
if (*m) {
assert((*m)->n_reloading > 0);
(*m)->n_reloading--;
usec_t t;
int r;
+ assert(timeout);
+
if (!m->timer_event_source)
return 0;
assert(key);
assert(value);
+ POINTER_MAY_BE_NULL(details);
if (!details || !*details)
return -EINVAL;
usec_t t;
int r;
+ assert(timeout);
+
if (!s->timer_event_source)
return 0;
int fd, r;
FILE *f;
+ assert(status);
+ assert(ret_file);
+
fd = openat(dfd, name, O_RDONLY|O_CLOEXEC);
if (fd < 0) {
if (*status == 0)
usec_t t;
int r;
+ assert(timeout);
+
if (!s->timer_event_source)
return 0;
usec_t t;
int r;
+ assert(timeout);
+
if (!s->timer_event_source)
return 0;
assert(key);
assert(value);
+ POINTER_MAY_BE_NULL(details);
if (!details || !*details)
return -EINVAL;
int unit_can_clean(Unit *u, ExecCleanMask *ret) {
assert(u);
+ assert(ret);
if (!UNIT_VTABLE(u)->clean ||
u->load_state != UNIT_LOADED) {
int unit_exec_context_build_json(sd_json_variant **ret, const char *name, void *userdata) {
Unit *u = ASSERT_PTR(userdata);
ExecContext *c = unit_get_exec_context(u);
+
+ assert(ret);
+
if (!c) {
*ret = NULL;
return 0;