mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user