lib/repo: properly initialize boolean variable
authorLuca BRUNO <luca.bruno@coreos.com>
Fri, 23 Sep 2022 13:02:00 +0000 (13:02 +0000)
committerLuca BRUNO <luca.bruno@coreos.com>
Fri, 23 Sep 2022 13:02:00 +0000 (13:02 +0000)
This initializes a boolean variable that was previously left
uninitialized. It was detected by a RHT internal static analyzer.

src/libostree/ostree-repo.c

index 90cde65139a3039437880a3e521451b6f70d465a..7bdb3c4e1e30435eedf36a3a2cc07e1d551f7daf 100644 (file)
@@ -3514,7 +3514,7 @@ reload_sysroot_config (OstreeRepo          *self,
    * https://github.com/ostreedev/ostree/issues/1719
    * https://github.com/ostreedev/ostree/issues/1801
    */
-  gboolean valid_bootloader;
+  gboolean valid_bootloader = FALSE;
   for (int i = 0; CFG_SYSROOT_BOOTLOADER_OPTS_STR[i]; i++)
     {
       if (g_str_equal (bootloader, CFG_SYSROOT_BOOTLOADER_OPTS_STR[i]))