]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: sockettest: move declarations
authorJán Tomko <jtomko@redhat.com>
Tue, 28 Jul 2020 18:10:53 +0000 (20:10 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 25 Aug 2020 17:03:12 +0000 (19:03 +0200)
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>
tests/sockettest.c

index a3c27421fc1f9e2f2d6877a3efb8ce8b42577ddd..3183ca523f902cb736b1fadbd61eaf0f0078e203 100644 (file)
@@ -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; \