mirror of https://gitee.com/openkylin/libvirt.git
tests: sockettest: move declarations
Declare the structs: at the beginning of the block. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8687408f90
commit
7923996d77
|
@ -277,11 +277,11 @@ mymain(void)
|
|||
do { \
|
||||
virSocketAddr addr; \
|
||||
struct testParseData data = { &addr, addrstr, family, pass }; \
|
||||
struct testFormatData data2 = { &addr, addrstr, pass }; \
|
||||
memset(&addr, 0, sizeof(addr)); \
|
||||
if (virTestRun("Test parse " addrstr " family " #family, \
|
||||
testParseHelper, &data) < 0) \
|
||||
ret = -1; \
|
||||
struct testFormatData data2 = { &addr, addrstr, pass }; \
|
||||
if (virTestRun("Test format " addrstr " family " #family, \
|
||||
testFormatHelper, &data2) < 0) \
|
||||
ret = -1; \
|
||||
|
@ -291,11 +291,11 @@ mymain(void)
|
|||
do { \
|
||||
virSocketAddr addr; \
|
||||
struct testParseData data = { &addr, addrstr, family, true}; \
|
||||
struct testFormatData data2 = { &addr, addrformated, pass }; \
|
||||
memset(&addr, 0, sizeof(addr)); \
|
||||
if (virTestRun("Test parse " addrstr " family " #family, \
|
||||
testParseHelper, &data) < 0) \
|
||||
ret = -1; \
|
||||
struct testFormatData data2 = { &addr, addrformated, pass }; \
|
||||
if (virTestRun("Test format " addrstr " family " #family, \
|
||||
testFormatHelper, &data2) < 0) \
|
||||
ret = -1; \
|
||||
|
|
Loading…
Reference in New Issue