mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
clang-format/zdtm: fix clang complains about strange elseifs
Clang-format v13 on my Fedora 35 complains about these hunks, more over reading the formating we had before is a pain: } else /* comment */ if (smth) { fail("") return -1; } Let's make explicit {} braces for else, this way it looks much better. Fixes: 93dd984ca ("Run 'make indent' on all C files") Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
parent
d2b6faf8fd
commit
781676f102
@ -44,10 +44,12 @@ static int check_prot(char *ptr, int prot)
|
||||
fail("PROT_READ bypassed");
|
||||
return -1;
|
||||
}
|
||||
} else /* we come here on return from SIGSEGV handler */
|
||||
} else {
|
||||
/* we come here on return from SIGSEGV handler */
|
||||
if (prot & PROT_READ) {
|
||||
fail("PROT_READ rejected");
|
||||
return -1;
|
||||
fail("PROT_READ rejected");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sigsetjmp(segv_ret, 1)) {
|
||||
@ -56,10 +58,12 @@ static int check_prot(char *ptr, int prot)
|
||||
fail("PROT_WRITE bypassed");
|
||||
return -1;
|
||||
}
|
||||
} else /* we come here on return from SIGSEGV handler */
|
||||
} else {
|
||||
/* we come here on return from SIGSEGV handler */
|
||||
if (prot & PROT_WRITE) {
|
||||
fail("PROT_WRITE rejected");
|
||||
return -1;
|
||||
fail("PROT_WRITE rejected");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (signal(SIGSEGV, SIG_DFL) == SIG_ERR) {
|
||||
|
@ -33,10 +33,12 @@ static int check_prot(char *ptr, char val, int prot)
|
||||
fail("PROT_READ bypassed");
|
||||
return -1;
|
||||
}
|
||||
} else /* we come here on return from SIGSEGV handler */
|
||||
} else {
|
||||
/* we come here on return from SIGSEGV handler */
|
||||
if (prot & PROT_READ) {
|
||||
fail("PROT_READ rejected");
|
||||
return -1;
|
||||
fail("PROT_READ rejected");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sigsetjmp(segv_ret, 1)) {
|
||||
@ -45,10 +47,12 @@ static int check_prot(char *ptr, char val, int prot)
|
||||
fail("PROT_WRITE bypassed");
|
||||
return -1;
|
||||
}
|
||||
} else /* we come here on return from SIGSEGV handler */
|
||||
} else {
|
||||
/* we come here on return from SIGSEGV handler */
|
||||
if (prot & PROT_WRITE) {
|
||||
fail("PROT_WRITE rejected");
|
||||
return -1;
|
||||
fail("PROT_WRITE rejected");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (signal(SIGSEGV, SIG_DFL) == SIG_ERR) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user