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:
@@ -55,7 +55,7 @@ int clock_set_hwclock(const struct tm *tm) {
|
||||
}
|
||||
|
||||
int clock_is_localtime(const char* adjtime_path) {
|
||||
_cleanup_fclose_ FILE *f;
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
int r;
|
||||
|
||||
if (!adjtime_path)
|
||||
|
||||
Reference in New Issue
Block a user