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:
@@ -126,7 +126,7 @@ static int acquire_path(void) {
|
||||
strv_free_and_replace(arg_path, a);
|
||||
|
||||
if (DEBUG_LOGGING) {
|
||||
_cleanup_free_ char *j;
|
||||
_cleanup_free_ char *j = NULL;
|
||||
|
||||
j = strv_join(arg_path, ":");
|
||||
log_debug("Using %s as boot loader drop-in search path.", j);
|
||||
|
||||
Reference in New Issue
Block a user