Move declarations before statements

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko
2020-08-03 17:27:58 +02:00
parent 908bcaa452
commit a5152f23e7
23 changed files with 68 additions and 47 deletions

View File

@@ -89,10 +89,11 @@ G_GNUC_PRINTF(3, 4)
testEventReport(const char *name, bool failed, const char *msg, ...)
{
va_list vargs;
va_start(vargs, msg);
char *str = NULL;
struct testEventResultData data;
va_start(vargs, msg);
if (msg)
str = g_strdup_vprintf(msg, vargs);
@@ -325,6 +326,7 @@ mymain(void)
size_t i;
pthread_t eventThread;
char one = '1';
char *debugEnv = getenv("LIBVIRT_DEBUG");
for (i = 0; i < NUM_FDS; i++) {
if (virPipeQuiet(handles[i].pipeFD) < 0) {
@@ -333,7 +335,6 @@ mymain(void)
}
}
char *debugEnv = getenv("LIBVIRT_DEBUG");
if (debugEnv && *debugEnv &&
(virLogSetDefaultPriority(virLogParseDefaultPriority(debugEnv)) < 0)) {
fprintf(stderr, "Invalid log level setting.\n");