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:
@@ -1627,7 +1627,7 @@ int bus_exec_context_set_transient_property(
|
||||
|
||||
unit_write_settingf(u, flags, name, "RootHash=");
|
||||
} else {
|
||||
_cleanup_free_ void *p;
|
||||
_cleanup_free_ void *p = NULL;
|
||||
|
||||
encoded = hexmem(roothash_decoded, roothash_decoded_size);
|
||||
if (!encoded)
|
||||
@@ -1673,7 +1673,7 @@ int bus_exec_context_set_transient_property(
|
||||
|
||||
unit_write_settingf(u, flags, name, "RootHashSignature=");
|
||||
} else {
|
||||
_cleanup_free_ void *p;
|
||||
_cleanup_free_ void *p = NULL;
|
||||
ssize_t len;
|
||||
|
||||
len = base64mem(roothash_sig_decoded, roothash_sig_decoded_size, &encoded);
|
||||
|
||||
Reference in New Issue
Block a user