diff --git a/test/zdtm/static/mprotect00.c b/test/zdtm/static/mprotect00.c index 006b64772..717b7ddcf 100644 --- a/test/zdtm/static/mprotect00.c +++ b/test/zdtm/static/mprotect00.c @@ -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) { diff --git a/test/zdtm/static/shm-mp.c b/test/zdtm/static/shm-mp.c index 1929dac19..c95f3d84c 100644 --- a/test/zdtm/static/shm-mp.c +++ b/test/zdtm/static/shm-mp.c @@ -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) {