maint: avoid static zero init in tests

C guarantees that static variables are zero-initialized.  Some older
compilers (and also gcc -fno-zero-initialized-in-bss) create larger
binaries if you explicitly zero-initialize a static variable.

* tests/eventtest.c: Fix initialization.
* tests/testutils.c: Likewise.
* tests/virhostdevtest.c: Likewise.
* tests/virportallocatortest.c: Likewise.
* tests/virscsitest.c: Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Eric Blake
2014-10-28 12:38:04 -06:00
parent 0585332430
commit a396c11e92
5 changed files with 12 additions and 12 deletions

View File

@@ -74,20 +74,20 @@ static unsigned int testVerbose = -1;
static unsigned int testExpensive = -1;
#ifdef TEST_OOM
static unsigned int testOOM = 0;
static unsigned int testOOM;
static unsigned int testOOMStart = -1;
static unsigned int testOOMEnd = -1;
static unsigned int testOOMTrace = 0;
static unsigned int testOOMTrace;
# ifdef TEST_OOM_TRACE
void *testAllocStack[30];
int ntestAllocStack;
# endif
#endif
static bool testOOMActive = false;
static bool testOOMActive;
static size_t testCounter = 0;
static size_t testStart = 0;
static size_t testEnd = 0;
static size_t testCounter;
static size_t testStart;
static size_t testEnd;
char *progname;