mirror of
https://github.com/systemd/systemd
synced 2024-10-06 16:21:34 +00:00
tree-wide: add some asserts
This commit is contained in:
parent
088d71f8ed
commit
cfc28ee232
|
@ -285,6 +285,8 @@ int etc_hosts_parse(EtcHosts *hosts, FILE *f) {
|
|||
unsigned nr = 0;
|
||||
int r;
|
||||
|
||||
assert(hosts);
|
||||
|
||||
for (;;) {
|
||||
_cleanup_free_ char *line = NULL;
|
||||
char *l;
|
||||
|
|
|
@ -145,6 +145,8 @@ int parse_cpu_set_full(
|
|||
_cleanup_(cpu_set_reset) CPUSet c = {};
|
||||
const char *p = ASSERT_PTR(rvalue);
|
||||
|
||||
assert(cpu_set);
|
||||
|
||||
for (;;) {
|
||||
_cleanup_free_ char *word = NULL;
|
||||
unsigned cpu_lower, cpu_upper;
|
||||
|
@ -198,6 +200,8 @@ int parse_cpu_set_extend(
|
|||
_cleanup_(cpu_set_reset) CPUSet cpuset = {};
|
||||
int r;
|
||||
|
||||
assert(old);
|
||||
|
||||
r = parse_cpu_set_full(rvalue, &cpuset, true, unit, filename, line, lvalue);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
|
Loading…
Reference in a new issue