[PATCH] Clean up global name space in examples and tests.

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

 



These don't really matter, other than to remove false-positives
if/when we ever automate checks for unnecessarily-global symbols.

	Clean up global name space in examples and tests.
	* docs/examples/suspend.c: Declare global "conn" to be static.
	* tests/qemuxml2argvtest.c: Declare global "driver" to be static.
	* tests/qemuxml2xmltest.c: Likewise.

diff --git a/docs/examples/suspend.c b/docs/examples/suspend.c
index 80e4da7..9ca6299 100644
--- a/docs/examples/suspend.c
+++ b/docs/examples/suspend.c
@@ -15,7 +15,7 @@
 #include <stdio.h>
 #include <libvirt/libvirt.h>

-virConnectPtr conn = NULL; /* the hypervisor connection */
+static virConnectPtr conn = NULL; /* the hypervisor connection */

 /**
  * checkDomainState:
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index d4e39b2..22e2e81 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -16,7 +16,7 @@

 static char *progname;
 static char *abs_top_srcdir;
-struct qemud_driver driver;
+static struct qemud_driver driver;

 #define MAX_FILE 4096

diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index c42e6fb..2ab1696 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -16,7 +16,7 @@

 static char *progname;
 static char *abs_top_srcdir;
-struct qemud_driver driver;
+static struct qemud_driver driver;

 #define MAX_FILE 4096

--
1.5.4.rc1.11.gd2f82

--
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]