diff options
author | Jim Meyering <meyering@redhat.com> | 2009-12-15 09:43:29 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-12-15 17:46:04 +0100 |
commit | 2e5efc3d6e8293f9cc3be6cc17b124910d8c04e3 (patch) | |
tree | 3c954cd82908d971c5f4b0b3b45f928f198be356 /tests/reconnect.c | |
parent | maint: remove from VC two gnulib-provided files (diff) | |
download | libvirt-2e5efc3d6e8293f9cc3be6cc17b124910d8c04e3.tar.gz libvirt-2e5efc3d6e8293f9cc3be6cc17b124910d8c04e3.tar.bz2 libvirt-2e5efc3d6e8293f9cc3be6cc17b124910d8c04e3.zip |
avoid calling exit with a constant; use EXIT_* instead
This appeases a new gnulib-provided "syntax-check".
* daemon/libvirtd.c (main): Use EXIT_FAILURE, not 1.
* proxy/libvirt_proxy.c (main): Likewise, and EXIT_SUCCESS, not 0.
* tests/conftest.c (main): Likewise.
* tests/reconnect.c (main): Likewise.
* tests/testutils.h (EXIT_AM_SKIP): Define.
* tests/nodeinfotest.c (mymain): Use EXIT_AM_SKIP, not 77.
* tests/qemuargv2xmltest.c: Likewise.
* tests/qemuxml2xmltest.c: Likewise.
* tests/virshtest.c (mymain): Likewise.
Diffstat (limited to 'tests/reconnect.c')
-rw-r--r-- | tests/reconnect.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/reconnect.c b/tests/reconnect.c index 33af2cc8d..63877fc6b 100644 --- a/tests/reconnect.c +++ b/tests/reconnect.c @@ -24,12 +24,12 @@ int main(void) { } if (conn == NULL) { fprintf(stderr, "First virConnectOpen() failed\n"); - exit(1); + exit(EXIT_FAILURE); } dom = virDomainLookupByID(conn, id); if (dom == NULL) { fprintf(stderr, "First lookup for domain %d failed\n", id); - exit(1); + exit(EXIT_FAILURE); } virDomainFree(dom); virConnectClose(conn); @@ -39,16 +39,16 @@ int main(void) { conn = virConnectOpen(NULL); if (conn == NULL) { fprintf(stderr, "Second virConnectOpen() failed\n"); - exit(1); + exit(EXIT_FAILURE); } dom = virDomainLookupByID(conn, id); if (dom == NULL) { fprintf(stderr, "Second lookup for domain %d failed\n", id); - exit(1); + exit(EXIT_FAILURE); } virDomainFree(dom); virConnectClose(conn); printf("OK\n"); - exit(0); + exit(EXIT_SUCCESS); } |