]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pid1: remove unnecessary error reassignment
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Oct 2018 10:35:37 +0000 (12:35 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Oct 2018 13:36:24 +0000 (15:36 +0200)
LGTM was complaining:
> Comparison is always true because r >= 0.

src/core/manager.c

index 5baa30d3dde69eac16c0c78918a887eaabc49933..c361a1ec076cf7d9c7a33d0ea8f628ab29d11c21 100644 (file)
@@ -3459,9 +3459,7 @@ int manager_reload(Manager *m) {
         m->uid_refs = hashmap_free(m->uid_refs);
         m->gid_refs = hashmap_free(m->gid_refs);
 
-        q = lookup_paths_init(&m->lookup_paths, m->unit_file_scope, 0, NULL);
-        if (q < 0 && r >= 0)
-                r = q;
+        r = lookup_paths_init(&m->lookup_paths, m->unit_file_scope, 0, NULL);
 
         q = manager_run_environment_generators(m);
         if (q < 0 && r >= 0)