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

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

Jim Meyering wrote:
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.
+1. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

On Mon, Jan 14, 2008 at 12:33:05PM +0000, Richard W.M. Jones wrote:
Jim Meyering wrote:
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.
+1.
ACK Dan -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
participants (3)
-
Daniel P. Berrange
-
Jim Meyering
-
Richard W.M. Jones