diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-12-04 12:11:31 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-06 08:50:53 +0900 |
commit | c73f413d8db7dafb39478238d7320d5b25733317 (patch) | |
tree | ef992820fc531f580dde5a249ca6bb20cd3a5783 /src/core/mount.c | |
parent | bf71ade808eefd52cca70035a680fb42806bbf80 (diff) | |
download | systemd-c73f413d8db7dafb39478238d7320d5b25733317.tar.gz |
tree-wide: check for NULLs in more places
Fixes issues pointed out by the `cpp/inconsistent-null-check` LGTM
query.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r-- | src/core/mount.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index 35368fe8e6..fcff70d40b 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -179,6 +179,7 @@ static bool mount_needs_quota(const MountParameters *p) { static void mount_init(Unit *u) { Mount *m = MOUNT(u); + assert(m); assert(u); assert(u->load_state == UNIT_STUB); @@ -681,6 +682,7 @@ static int mount_load(Unit *u) { Mount *m = MOUNT(u); int r, q = 0; + assert(m); assert(u); assert(u->load_state == UNIT_STUB); @@ -1256,6 +1258,7 @@ static int mount_deserialize_item(Unit *u, const char *key, const char *value, F Mount *m = MOUNT(u); int r; + assert(m); assert(u); assert(key); assert(value); @@ -1794,6 +1797,9 @@ static int mount_get_timeout(Unit *u, usec_t *timeout) { usec_t t; int r; + assert(m); + assert(u); + if (!m->timer_event_source) return 0; |