mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 03:42:19 +00:00
qemu: Rename @main variable in qemuDomainRemoveLogs()
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>
This commit is contained in:
parent
7940fe02d5
commit
9890eb0056
@ -11828,7 +11828,7 @@ qemuDomainRemoveLogs(virQEMUDriver *driver,
|
|||||||
{
|
{
|
||||||
g_autoptr(virQEMUDriverConfig) cfg = NULL;
|
g_autoptr(virQEMUDriverConfig) cfg = NULL;
|
||||||
g_autofree char *format = NULL;
|
g_autofree char *format = NULL;
|
||||||
g_autofree char *main = NULL;
|
g_autofree char *main_log = NULL;
|
||||||
g_autoptr(DIR) dir = NULL;
|
g_autoptr(DIR) dir = NULL;
|
||||||
struct dirent *entry;
|
struct dirent *entry;
|
||||||
int rc;
|
int rc;
|
||||||
@ -11840,13 +11840,13 @@ qemuDomainRemoveLogs(virQEMUDriver *driver,
|
|||||||
if (virDirOpen(&dir, cfg->logDir) < 0)
|
if (virDirOpen(&dir, cfg->logDir) < 0)
|
||||||
return -1;
|
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);
|
format = g_strdup_printf("%s.log.%%u", name);
|
||||||
|
|
||||||
while ((rc = virDirRead(dir, &entry, cfg->logDir)) > 0) {
|
while ((rc = virDirRead(dir, &entry, cfg->logDir)) > 0) {
|
||||||
unsigned int u;
|
unsigned int u;
|
||||||
|
|
||||||
if (STREQ(entry->d_name, main) ||
|
if (STREQ(entry->d_name, main_log) ||
|
||||||
sscanf(entry->d_name, format, &u) == 1) {
|
sscanf(entry->d_name, format, &u) == 1) {
|
||||||
g_autofree char *path = NULL;
|
g_autofree char *path = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user