]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/load-fragment: remove unnecessary intialization 13784/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Oct 2019 14:33:54 +0000 (16:33 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Oct 2019 14:33:54 +0000 (16:33 +0200)
manager_load_unit() better set it on success, and unit_set_slice() asserts
that the argument is not NULL, so initializing it to NULL is not useful.

src/core/load-fragment.c

index 1f702bd87aea884fc814d1fa9750aa77555696fe..50203c76a28fd5a981b9d4d758a4b2a486c9e6f5 100644 (file)
@@ -3086,7 +3086,7 @@ int config_parse_unit_slice(
 
         _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
         _cleanup_free_ char *k = NULL;
-        Unit *u = userdata, *slice = NULL;
+        Unit *u = userdata, *slice;
         int r;
 
         assert(filename);