[libvirt-designer 1/4] virtxml: Make global var local

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OsinfoLoader is declared as a global variable in virtxml.c but
is only used in one function, so it can be made local.
---
 examples/virtxml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/virtxml.c b/examples/virtxml.c
index 2918ee0..18b0456 100644
--- a/examples/virtxml.c
+++ b/examples/virtxml.c
@@ -35,7 +35,6 @@
 
 GList *disk_str_list = NULL;
 GList *iface_str_list = NULL;
-OsinfoLoader *loader = NULL;
 OsinfoDb *db = NULL;
 
 #define print_error(...) \
@@ -65,6 +64,7 @@ load_osinfo(void)
 {
     GError *err = NULL;
     gboolean ret = FALSE;
+    OsinfoLoader *loader = NULL;
 
     loader = osinfo_loader_new();
     osinfo_loader_process_default_path(loader, &err);
-- 
1.8.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]