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

Jim Meyering jim at meyering.net
Mon Jan 14 10:38:16 UTC 2008


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




More information about the libvir-list mailing list