tree-wide: avoid uninitialized warning on _cleanup_ variables
With some versions of the compiler, the _cleanup_ attr makes it think the variable might be freed/closed when uninitialized, even though it cannot happen. The added cost is small enough to be worth the benefit, and optimized builds will help reduce it even further.
This commit is contained in:
@@ -772,7 +772,7 @@ void lookup_paths_log(LookupPaths *p) {
|
||||
log_debug("Ignoring unit files.");
|
||||
p->search_path = strv_free(p->search_path);
|
||||
} else {
|
||||
_cleanup_free_ char *t;
|
||||
_cleanup_free_ char *t = NULL;
|
||||
|
||||
t = strv_join(p->search_path, "\n\t");
|
||||
log_debug("Looking for unit files in (higher priority first):\n\t%s", strna(t));
|
||||
|
||||
Reference in New Issue
Block a user