]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Rename @main variable in qemuDomainRemoveLogs()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 6 Apr 2022 08:10:24 +0000 (10:10 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 6 Apr 2022 08:25:15 +0000 (10:25 +0200)
Older GCC fails to understand that 'char *main' is a variable and
not main() function. Rename the variable to appease old GCC.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Nikolay Shirokovskiy <nshirokovskiy@openvz.org>
src/qemu/qemu_domain.c

index c35e5c09a30ba76d17ee4adfd4c54b64cd908ce9..a4334de1587eab1d4af9a7ca48a9fb11801c3dbc 100644 (file)
@@ -11828,7 +11828,7 @@ qemuDomainRemoveLogs(virQEMUDriver *driver,
 {
     g_autoptr(virQEMUDriverConfig) cfg = NULL;
     g_autofree char *format = NULL;
-    g_autofree char *main = NULL;
+    g_autofree char *main_log = NULL;
     g_autoptr(DIR) dir = NULL;
     struct dirent *entry;
     int rc;
@@ -11840,13 +11840,13 @@ qemuDomainRemoveLogs(virQEMUDriver *driver,
     if (virDirOpen(&dir, cfg->logDir) < 0)
         return -1;
 
-    main = g_strdup_printf("%s.log", name);
+    main_log = g_strdup_printf("%s.log", name);
     format = g_strdup_printf("%s.log.%%u", name);
 
     while ((rc = virDirRead(dir, &entry, cfg->logDir)) > 0) {
         unsigned int u;
 
-        if (STREQ(entry->d_name, main) ||
+        if (STREQ(entry->d_name, main_log) ||
             sscanf(entry->d_name, format, &u) == 1) {
             g_autofree char *path = NULL;