]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: make sure we initialize return parameters in unit_file_find_path() on...
authorLennart Poettering <lennart@poettering.net>
Thu, 29 Nov 2018 10:10:37 +0000 (11:10 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 29 Nov 2018 10:21:55 +0000 (11:21 +0100)
According to our coding style return values should be initialized when
we return any form of success, do so here too.

src/systemctl/systemctl.c

index 328c11a2cd3934dbcdcecf9f7b5b24383849793f..490b739f9e43bf4d0800bf16a4c6c3a3e1fdddce 100644 (file)
@@ -2443,6 +2443,9 @@ static int unit_file_find_path(LookupPaths *lp, const char *unit_name, char **re
                 return 1;
         }
 
+        if (ret_unit_path)
+                *ret_unit_path = NULL;
+
         return 0;
 }